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

Ensure that ping threads are closed when the ServerApp finishes. #25

Merged
merged 1 commit into from
May 2, 2019

Conversation

moesenle
Copy link
Contributor

Otherwise, the thread might keep running and even send pings on a wrong file descriptor. The reason is that file descriptors seem to be re-used by the system. Now, if the ping thread sleeps during such a re-connect and re-use of a file descriptor, it will simply keep pinging and tickling on the new connection. This can easily lead to a lot of threads that won't terminate.

This most likely fixes #21 and #10.

Otherwise, the thread might keep running and evend send pings on a wrong
file descriptor. The reason is that file descriptors seem to be re-used
by the system. Now, if the ping thread sleeps during such a re-connect
and re-use of a file descriptor, it will simply keep pinging and
tickling on the new connection. This can easily lead to a lot of threads
that won't terminate.
@jaspervdj jaspervdj merged commit d57683d into jaspervdj:master May 2, 2019
@jaspervdj
Copy link
Owner

@moesenle Thanks! Have you been testing this patch on some staging/production system?

@moesenle
Copy link
Contributor Author

moesenle commented May 2, 2019

@jaspervdj , thanks for merging it! Yes, we are using the patch already and it seems to work fine.

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

Successfully merging this pull request may close these issues.

Ping thread never exits
2 participants