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

websocket server not closing connection when terminal is idle #56

Open
dilip26 opened this issue Apr 17, 2018 · 3 comments
Open

websocket server not closing connection when terminal is idle #56

dilip26 opened this issue Apr 17, 2018 · 3 comments

Comments

@dilip26
Copy link

dilip26 commented Apr 17, 2018

No description provided.

@takluyver
Copy link
Member

I'm not quite sure what you mean. It's not meant to close the connection when the terminal is idle. You don't know when some output might arrive and need to be sent to the frontend.

@dilip26
Copy link
Author

dilip26 commented Apr 17, 2018

What I meant is, I wanted to close the connection when there is no response from the end user for 10 minutes.

for eg, like SSH timeout "broken pipe" after few minutes if the user is inactive on the terminal it closes the connection with msg broken pipe
Thank you in advance.

@dilip26 dilip26 closed this as completed Apr 17, 2018
@dilip26 dilip26 reopened this Apr 17, 2018
@takluyver
Copy link
Member

I thought that was just an error, not a feature ;-).

We use terminals in Jupyter, and we have this code in a subclass to track when a terminal was last active:

https://github.com/jupyter/notebook/blob/97b3b96f3dbec25390502a1bf1d4f113b6d16b59/notebook/terminal/handlers.py#L36-L42

You could use that to automatically close the terminal when its last activity was more than a certain time ago.

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

2 participants