-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Disconnect WebSocket if user is idle for 1 hour #1297
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
Comments
Depends on what you mean by idle. In our case idle is when the web socket is NOT being used, in which can we want to terminate the containing docker environment. We do this by watching the "heartbeat" file. We do not want to disconnect if the user keeps his browser open to code-server, though I can see that some users/developers would like that. Also what do you mean by disconnect? Logout the user so they need to re-type the password? Terminate Code-server? |
So this is independent of the heartbeat file. I think if someone leaves code-server open on their desktop for like 6 hours but does nothing, we shouldn't keep the WebSocket up, we should just disconnect the WebSocket. Disconnect just means drop the WebSocket. |
Maybe we could make this an option?
|
As long as it is clear in the doc's. Mind you I don't think the "heartbeat" file is documented either, except here in git "issues". Looks like a case of "Use the source, Luke!" :-) |
Yea we really need to document that. |
Even if the option was provided, it is more likely we will continue to use the heartbeat file, as we monitor it from outside the docker instance, and shutdown the docker instance completely when we reach our time out. That is we need to do more than shutdown the web socket on timeout. So just the heartbeat file needs to be documented. Where ever that is done. |
Yea I agree, the websocket will disconnect naturally anyway since their computer will just go to sleep if they leave it on for an excessive amount of time. |
See #1274 (comment)
The text was updated successfully, but these errors were encountered: