Skip to content

Session termination by router causes destructor to emit errors/exceptions #2

@turkanis

Description

@turkanis

I have found that when the WAMP client's session is terminated unexpectedly by the WAMP router, which can be expected to happen occasionally, the WebSocket client's destructor is called, which in turn calls fwrite(), which triggers a PHP notice with one of several error messages, e.g., "broken pipe". This event can occur outside of any call to the WAMP or WebSocket client, e.g., during unrelated database access.

The pull request #1 addresses the issue by translating errors emitted by fread() and fwrite() into ConnectionExceptions, and by enclosing the code in the destructor in a try/catch block. I have created a similar pull request jszczypk/WampSyncClient#1 for WampSyncClient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions