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

websocket: closing a connection may block for 5s #2201

Closed
marten-seemann opened this issue Mar 17, 2023 · 1 comment · Fixed by #2280
Closed

websocket: closing a connection may block for 5s #2201

marten-seemann opened this issue Mar 17, 2023 · 1 comment · Fixed by #2280
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@marten-seemann
Copy link
Contributor

See nhooyr/websocket#355 for details. This might block the connection manager loop and the swarm.Close for a long time, if we have a lot of WebSocket connections and this happens multiple times.
Not sure how realistic this is in practice, but I wouldn't want to risk it.

@marten-seemann marten-seemann added the kind/bug A bug in existing code (including security flaws) label Mar 17, 2023
@MarcoPolo
Copy link
Contributor

Could we read the rest of the frame and discard before calling close as a temporary workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants