mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-04-15 13:36:55 +02:00
device: timers: add jitter on ack failure reinitiation
This commit is contained in:
parent
6a0a3a5406
commit
f70546bc2e
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ func expiredPersistentKeepalive(peer *Peer) {
|
|||
/* Should be called after an authenticated data packet is sent. */
|
||||
func (peer *Peer) timersDataSent() {
|
||||
if peer.timersActive() && !peer.timers.newHandshake.IsPending() {
|
||||
peer.timers.newHandshake.Mod(KeepaliveTimeout + RekeyTimeout)
|
||||
peer.timers.newHandshake.Mod(KeepaliveTimeout + RekeyTimeout + time.Millisecond*time.Duration(rand.Int31n(RekeyTimeoutJitterMaxMs)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue