Skip to content

Handling Connection Close #35

@joders

Description

@joders

The server I'm connecting to seems to close the connection after some time. I would like to handle this event (re-establishing the connection). From what I can see in the code pusherclient doesn't seem to expose the close handler of websocket-client WebSocketApp. Instead only a log is written and timers stopped via the following code:

    def _on_close(self, ws, *args):
        self.logger.info("Connection: Connection closed")
        self.state = "disconnected"
        self._stop_timers()

Is there a way to handle the connection close with pusherclient without modifying it?

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