Skip to content

Dispose on MessageSubject subscription should close socket #9

@mbonneau

Description

@mbonneau

With the following:

$client = new \Rx\Websocket\Client('ws://127.0.0.1:9090/ws');

$client->subscribe(function (MessageSubject $ms) {
    $disp = $ms->subscribe();

    addTimer(2, function () use ($disp) {
        echo "Dispose...\n";
        $disp->dispose();
    });
});

The websocket should close when there are no more subscriptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions