Refactor timers.go

This commit is contained in:
Mathias Hall-Andersen
2017-11-30 23:22:40 +01:00
parent 479a6f240e
commit 02ce67294c
8 changed files with 258 additions and 172 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
return &IPCError{Code: ipcErrorInvalid}
}
}
signalSend(peer.signal.handshakeReset)
peer.timer.handshakeDeadline.Reset(RekeyAttemptTime)
dummy = false
}
@@ -265,7 +265,7 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
return err
}
peer.endpoint = endpoint
signalSend(peer.signal.handshakeReset)
peer.timer.handshakeDeadline.Reset(RekeyAttemptTime)
return nil
}()