forked from cloudflare/boringtun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: directly compute when to make new handshake (#69)
When we send a data packet and don't receive any replies for a certain amount of time, we want to initiate a new handshake. This is currently implemented by remembering the time we sent the first unreplied packet. That timer is cleared every time we receive a packet. The functionality we want to implement is easier to understand if we directly compute the time when the new handshake is due. This allows us to avoid recomputing that timestamp later on and we can just check if `now` has surpassed this timestamp.
- Loading branch information
1 parent
935d9ec
commit 0b87029
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters