-
Notifications
You must be signed in to change notification settings - Fork 389
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
No timeout for websocket handshake #406
Comments
Hello, If the TCP connection breaks the tunnel breaks too. |
I used direct tunnel in the example
The problem is connection leakage. Currently, for robust operation, client of wstunnel client must also act as a supervisor process that restarts wstunnel in case of connection timeout. It's not very convenient. |
It does, at the TCP level. Each TCP connection has a keep-alive set, so if the underlaying connection break or is not working anymore, wstunnel recycle them. In your case, the HTTP connection is not making any progress/there is no response, but the TCP connection is still alive. If you drop packet/or close your TCP connection, the keep-alive will kick-in and the connection is going to be recycled. It is possible to add a hard timeout for the HTTP handshake to happen, but this one will need to be high in order to not break reverse tunnel |
OK. I got it. It's quite unusual though. The issue can be closed. (For those who came here from a search) |
Describe the bug
wstunnel waits forever for a websocket handshake
Steps to reproduce:
terminal 1
terminal 2
terminal 3
Expected behavior
wstunnel must close the connection after a while
Desktop
OS: Ubuntu 22.04
The text was updated successfully, but these errors were encountered: