Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Connection Close #35

Open
joders opened this issue Dec 28, 2018 · 0 comments
Open

Handling Connection Close #35

joders opened this issue Dec 28, 2018 · 0 comments

Comments

@joders
Copy link

joders commented Dec 28, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant