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

Websockets can't tell whether a connection was closed cleanly #65

Open
tehdragonfly opened this issue Apr 17, 2015 · 1 comment
Open
Labels

Comments

@tehdragonfly
Copy link
Contributor

A regular disconnect message should be sent under the following circumstances:

  • The user disconnects via the "Abscond" button
  • The user navigates to a different page in the same tab
  • The user closes the tab

A connection error message should be sent under the following circumstances:

  • The user's browser crashes
  • Nginx times out the socket

So far I haven't been able to reliably distinguish between these two sets of circumstances.

@tehdragonfly
Copy link
Contributor Author

Some test results (in Firefox):

  • Disconnected via abscond button: no close code.
  • Typed /search into the URL bar: close code 1001.
  • Closed the tab: close code 1001.
  • Commented out ping code so nginx timed out: no close code.
  • killall -9 firefox: no close code.
  • killall -9 nginx: no close code.

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

No branches or pull requests

1 participant