-
Notifications
You must be signed in to change notification settings - Fork 8
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
[issue tracker]: pipe dead lock in WebSocketProxy callback
#42
Comments
The current implementation processes message receiving and sending serially within the same task, which prevents multiple receives and sends. fastapi-proxy-lib/src/fastapi_proxy_lib/core/websocket.py Lines 344 to 421 in 52f048f
To resolve this issue, we need to modify the underlying implementation by creating four asynchronous tasks specifically for However, managing so many asynchronous tasks robustly is a challenge. We must switch to the I’m currently not motivated to resolve this issue because I’m unsure if there’s demand from the community. If there is interest, PRs are welcome. Alternatively, you can give a thumbs up on the issue to indicate community feedback. |
I just found a bug. The current implementation only supports a strict
one-receive-one-send
mode within a single loop. If this pattern is violated, such asmultiple receives and one send
,one receive and multiple sends
, orsending before receiving
within a single loop, it will result in a deadlock.Unfortunately, we can't resolve this issue until the underlying logic is rewritten using
anyio
andmemory-object-streams
.There is already a PR for
anyio
: #34. However, this PR still has many issues, and I currently don't have time to merge it.Originally posted by @WSH032 in #41 (comment)
The text was updated successfully, but these errors were encountered: