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

Fix race condition when watcher is killed too fast #56

Merged
merged 2 commits into from
Jul 14, 2022

Conversation

wilbowma
Copy link
Contributor

@wilbowma wilbowma commented Jul 14, 2022

If a client disconnects normally very quickly, the watcher is killed
before its channel is read, causing connection to block indefinitely.
To fix, try reading from the watcher's channel after killing it, to
unblock the connection's main thread.

To fix, give up on the put if the watcher is dead.

Fixes #55

If a client disconnects normally very quickly, the watcher is killed
before its channel is read, causing connection to block indefinitely.
To fix, try reading from the watcher's channel after killing it, to
unblock the connection's main thread.
handin-server/main.rkt Outdated Show resolved Hide resolved
If a client disconnected normally very quickly, the watcher is killed
before its channel is read, causing the connection to block
indefinitely.
To fix, give up on the put if the watcher thread is dead.
@mflatt mflatt merged commit c90e664 into racket:master Jul 14, 2022
@mflatt
Copy link
Member

mflatt commented Jul 14, 2022

Thanks!

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.

Client saying bye too fast causes server to block, connection to hang
2 participants