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

Logger: Close orphaned connections #319

Open
solardiz opened this issue Feb 25, 2024 · 0 comments
Open

Logger: Close orphaned connections #319

solardiz opened this issue Feb 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@solardiz
Copy link
Contributor

Nov 19, 2022

The sender will sometimes detect an issue and reconnect, but the receiver currently has no logic to close the old connection on its end and kill the old child process when this happens.

We should probably enable SO_KEEPALIVE and maybe set Linux-specific TCP_KEEP* to lower values than defaults. We need this at least on the receiving end, and optionally on the sending end.

Alternatively or additionally, our connection-accepting code could be modified to kill old children when a new connection arrives from the same IP address... although we could prefer to postpone that until the Noise handshake succeeds, and that's tricky.

Nov 24, 2022

The sender will sometimes detect an issue and reconnect, but the receiver currently has no logic to close the old connection on its end and kill the old child process when this happens.

It's not exactly that bad - normally, the connection closing does propagate and result in a failed read from the socket. However, when the network path is down for a long time until successful reconnect, the old connection might already be forgotten by the sending system kernel's TCP stack, in which case the receiver would never know it's closed.

@solardiz solardiz added the enhancement New feature or request label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant