summaryrefslogtreecommitdiffhomepage
path: root/src/timers.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/timers.go')
-rw-r--r--src/timers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timers.go b/src/timers.go
index fd2bdc3..2454414 100644
--- a/src/timers.go
+++ b/src/timers.go
@@ -52,6 +52,10 @@ func (peer *Peer) KeepKeyFreshReceiving() {
func (peer *Peer) EventHandshakeComplete() {
peer.device.log.Info.Println("Negotiated new handshake for", peer.String())
peer.timer.zeroAllKeys.Reset(RejectAfterTime * 3)
+ atomic.StoreInt64(
+ &peer.stats.lastHandshakeNano,
+ time.Now().UnixNano(),
+ )
signalSend(peer.signal.handshakeCompleted)
}