diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-18 15:22:56 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-18 15:22:56 +0200 |
commit | 18714fc4a444f3369dc9ca25e5a6e50343770ea4 (patch) | |
tree | 2f517973541ac510895a878c5dd9dff86927d947 /src/timers.go | |
parent | bd6027a4d5114df964e88e357b52883411174558 (diff) |
Added last_handshake_time fields to UAPI
Diffstat (limited to 'src/timers.go')
-rw-r--r-- | src/timers.go | 4 |
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) } |