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

let ping only ping when no activity happened #2393

Closed
dvc94ch opened this issue Dec 18, 2021 · 3 comments
Closed

let ping only ping when no activity happened #2393

dvc94ch opened this issue Dec 18, 2021 · 3 comments

Comments

@dvc94ch
Copy link
Contributor

dvc94ch commented Dec 18, 2021

Currently it takes a long time to detect networking issues. It may even take longer to detect the networking issue than it does to resolve it. Some ways to fix this are either:

  1. use if-watch to kill connections as soon as the interface going down was detected
  2. ping more frequently

there are some caveats with these options:

  1. seems pretty unreliable as we need to track what interface the connection comes from.
  2. should work well. but to avoid spaming the network with ping messages it would be nice if there was the ability to send pings only if the connection was idle
@thomaseizinger
Copy link
Contributor

Hmm, we could implement a final callback on ProtocolsHandler that gets called if we are planning to shutdown.

An alternative would be to refactor away the automatic closing of connections and instead only report to the behaviour that all handlers for a connection are idle. The behaviour could then choose to either send a message or close the connection.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Dec 20, 2021

I don't think this will be required for quic as quic already has a built in keep alive mechansim. tcp kind of has something but it apparently doesn't always work as one would expect.

@thomaseizinger
Copy link
Contributor

Closing as stale. Some related discussion in #3353.

@thomaseizinger thomaseizinger closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants