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 connection closed after sleep on Chrome on Mac #83

Open
PerBothner opened this issue Jun 23, 2020 · 1 comment
Open

WebSockets connection closed after sleep on Chrome on Mac #83

PerBothner opened this issue Jun 23, 2020 · 1 comment

Comments

@PerBothner
Copy link
Owner

When sleeping on MacOS, using Google Chromium (Chrome or Electron or Qt) the WebSocket connection is closed with a code of 1006 (Abnormal closure).

This does not happen when using Firefox or Safari. It does not happen when using Linux or WSL with Chromium. However, it happens on Chromium-based browsers (tested on Chrome, Electron, and Qt) MacOS.

Seems like a Chromium bug. There may be a work-around, but I don't have one yet. (We do want to support lost-connection reattachment as a general feature.) Using Firefox or Safari is suggested for now. I may try using webview.

@PerBothner
Copy link
Owner Author

I checked in a fix/work-around for this: When the WebSocket connection is closed without user action, the JavaScript will create a new connection. Preliminary testing seems to work with both Electron and Qt.

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