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

Connection synchronization #80

Closed
UkoeHB opened this issue Sep 3, 2023 · 2 comments
Closed

Connection synchronization #80

UkoeHB opened this issue Sep 3, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@UkoeHB
Copy link
Collaborator

UkoeHB commented Sep 3, 2023

When you use tokio-tungstenite to run a server, accepting a new connection blocks the acceptor loop until the websocket handshake is complete. This opens a DOS vector where malicious clients can prevent other clients from connecting by hogging the acceptor loop.

The solution here seems to be spawning a new tokio task to finish accepting a connection after the TcpListener connects.

@gbaranski
Copy link
Owner

ah yeah, that's true.
That should be an easy fix.

@gbaranski
Copy link
Owner

it's actually the same as #30.
We can move there.

@gbaranski gbaranski added the duplicate This issue or pull request already exists label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants