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

Disconnect handler is never called #2

Open
Dids opened this issue Jan 30, 2019 · 3 comments
Open

Disconnect handler is never called #2

Dids opened this issue Jan 30, 2019 · 3 comments

Comments

@Dids
Copy link

Dids commented Jan 30, 2019

From what I've been able to gather, the disconnect handler is never getting called, and I'm assuming because there's no actual reconnecting support, the connection will basically end up in a "bad state", where it thinks it's still connected.

@tomkcook
Copy link
Contributor

I'm seeing this too. On disconnect, usually the first sign is that the call to ReadMessage() at line gowebsocket.go:131 exits with an error. The only effect this has is that a message is logged and the enclosing goroutine exits, but whatever called Connect() is never informed.

Pull request #6 addresses this.

@tomkcook
Copy link
Contributor

My pull request works in the case where the connection is actively interrupted (eg the computer's ethernet cable is yanked or the wifi connection drops out). It doesn't address the case where the network is interrupted further upstream, because the library implements no timeouts / deadlines. I'll work up a pull request to address this.

@jesst3r
Copy link

jesst3r commented Sep 24, 2019

still not working?

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

3 participants