-
Notifications
You must be signed in to change notification settings - Fork 9
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
tcp connection is not closed if websocket goes down #114
Comments
@toewsar do you happen to have an easy way to reproduce it? I’d say the fix will be relatively easy (as some kind of shutdown signal is probably missing), but just finding the right spot might be more difficult. |
@reubenmiller it should possible to reproduce, by restarting the remote-access app in the device while a connection is running.
host$ c8ylp server ABCD --env-file .env -c ssh --port 22222
host$ ssh admin@localhost -p 22222
|
@reubenmiller I had this implemented in the previous version of c8ylp. I think we can do something similar here: We can use the proxy and call shutdown()? Anything that I'm missing? |
It's also a question of expected behavior in server mode. In last version I expected that it runs forever, so on each disconnect of WS it tries to reconnect instead of terminating the whole proxy instance. |
Every protocol that requires a specific handshake at the beginning and does not send keepalive frames won't work if the client doesn't get informed about the connection abort. |
For that reason we have to discuss what's the best scenario on web socket disconnect is:
I would prefer the 2. option but only in server mode, so we cannot just run "shutdown" (option 1) but have to implement a new function "disconnect" which disconnects the client but keeps the server alive. |
I would also prefer the 2. option. |
First tests were successful. Thank you. |
If the websocket connection closes the local tcp connection does not get informend and it looks like the connection the proxied port is still established.
Therefore the proxy should also close alle established connections on the local tcp side if the websocket connection breaks.
The text was updated successfully, but these errors were encountered: