-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use keepalives instead of handshakes for timeouts #17
Use keepalives instead of handshakes for timeouts #17
Conversation
38bcb95
to
0fa0b1a
Compare
I would like to straighten the altered main loop before merging. The idea of this MR is reviewable though. |
0fa0b1a
to
f580f1b
Compare
I didn't come up with an improvement for the new additions in the main loop. There's still the open question, whether we need a debounce or not, and I'm not sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be fine to take out the debounce.
loop { | ||
if args.peer_timeout > Duration::ZERO && last_timeout_removal.elapsed() > timeout_debounce { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should still be possible to disable timeout entirely by setting the duration to zero. Please put this back in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
f580f1b
to
e4d7522
Compare
After the merge of this PR I will rework #11 . |
This PR introduces the use of keepalives instead of handshakes via wireguard. Handshakes are made approx. every minute, keepalives are configurable. This way we can test a peer deletion without waiting for a handshake. This also allows us to introduce tighter timeout intervals, as the lower bound isn't fixed to one minute anymore.