-
Notifications
You must be signed in to change notification settings - Fork 987
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
websockets initial messages delayed multiple seconds #1961
Comments
Either I don't understand what you mean or I cannot reproduce it. This is what I see 2023-04-25_15-41-39.mov |
Looks like you have main checked out instead of the branch I linked. |
Ah I see. I just It's most likely a thing with tungstenite though. Axum's web sockets are a very thin wrapper around tungstenite. I'll close this for now but feel free to ask follow up questions. |
Thankyou for at least confirming you can reproduce it, I've now reproduced it without axum involved and will take it up with the tungstenite project. |
Bug Report
Version
axum 0.6 and latest git
Platform
Linux memes 6.2.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 20 Apr 2023 16:11:55 +0000 x86_64 GNU/Linux
Crates
axum
Description
Please refer to this repo that reproduces the issues https://github.com/rukai/axum/tree/websockets_bug_report
Run
axum/examples/websockets/src> cargo run --bin example-websockets
and
axum/examples/websockets/src> cargo run --bin example-client
I create a websocket handler on the server which responds with many messages for each message that the client sends it.
The server sends each message 1 second apart, but the client receives the first 3 messages all at once after 3 seconds. From that point things proceed reasonably
Instead of this behavior I expect the initial messages to arrive immediately after being sent.
In my application I had these much more severe scenarios occur:
but I couldnt recreate these severe cases in a simple scenario.
My application is running over a network which may be making the issue worse than the simple localhost test in the reproduced example.
Possibly this is a tungstenite issue, but figured I'd start by reporting it here.
The text was updated successfully, but these errors were encountered: