summaryrefslogtreecommitdiffhomepage
path: root/device/noise-protocol.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/noise-protocol.go')
-rw-r--r--device/noise-protocol.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/noise-protocol.go b/device/noise-protocol.go
index 1f70e81..dd75cc3 100644
--- a/device/noise-protocol.go
+++ b/device/noise-protocol.go
@@ -301,7 +301,7 @@ func (device *Device) ConsumeMessageInitiation(msg *MessageInitiation) *Peer {
var ok bool
ok = timestamp.After(handshake.lastTimestamp)
- ok = ok && time.Now().Sub(handshake.lastInitiationConsumption) > HandshakeInitationRate
+ ok = ok && time.Since(handshake.lastInitiationConsumption) > HandshakeInitationRate
handshake.mutex.RUnlock()
if !ok {
return nil