-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 (since 1.32.4 after switching to fastwebsockets) server stops receiving messages on client tcp session hang #18808
Comments
after many test runs, tests always pass on deno 1.31.3, sometimes fail on 1.32.0-1.32.3 due to lack of try/catch on ws.send which happen after stalling, and never pass on 1.32.4+ failing with these messages:
|
@littledivy please take a look |
described problem with hanging websocket server when tcp peer stops responding is still reproducible on v1.33.1 |
littledivy
added a commit
that referenced
this issue
Apr 29, 2023
levex
pushed a commit
that referenced
this issue
May 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm developing a service that depends on websockets, and found that server side of websocket in deno 1.32.4 and 1.32.5 hangs if websocket client disappears (terminates, reboots) without correctly closing tcp session, until the tcp session resets.
This behavior leads to unpredictable stalls due to hanging/disappearing websocket client connections (which itself is a normal for network clients).
I've written a deno test to reproduce which sets up a websocket server and launches worker that sets up websocket client connection and sends messages every few seconds, then test suite terminates the worker (with worker.terminate()) to make sure tcp connection is abruptly hung. This leads to both websocket server stopping receiving messages until the causing tcp session resets, and something happens to worker.terminate too as until the tcp session is reset the client working async function doesn't return.
Here's the deno test files to reproduce (works fine with deno < 1.32.4, doesn't work with 1.32.4, 1.32.5, canary as of 2023-04-23):
websocket_test.js
websocket_test_client_worker.js
running tests with
The text was updated successfully, but these errors were encountered: