Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Closing client from server closes other clients as well? #101

@undsoft

Description

@undsoft

Hello, my dear friends.

I need to say that it has been challenging trying to incorporate the library into a production environment :)

Scenario:

  1. User A connects.
  2. User B connects.
  3. After some time when User B sends a message, and in onMessage handler, server decides to disconnect user A.
  4. Server does:
$connection = $node->getConnection();

        $connection->close(
            Connection::CLOSE_NORMAL,
            $message
        );

where $node is the stored node of user A.

ER: User A is disconnected.
AR: Both users seem to lose the connection.

Upon debugging I can see that $node->getConnection()->close() goes to
Hoa\Stream\Stream->close() and to
Hoa\Socket\Server->_close(), which in turn gets current stream (User B, Mistake!) and fcloses it.

Metadata

Metadata

Assignees

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