diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-01 11:20:36 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-01 11:20:36 +0100 |
commit | 1e42b1402261d15b87b1b5871f7bc51342b46e34 (patch) | |
tree | aef0aef2eadf6ae7142486069405f45b84d59b58 /src/send.go | |
parent | a57c790e36439729a6af7e53ee9068898f3ac992 (diff) | |
parent | f73d2fb2d96bc3fbc8bc4cce452e3c19689de01e (diff) |
Merge branch 'timer-teardown' of git.zx2c4.com:wireguard-go into timer-teardown
Diffstat (limited to 'src/send.go')
-rw-r--r-- | src/send.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/send.go b/src/send.go index fa13c91..e0a546d 100644 --- a/src/send.go +++ b/src/send.go @@ -170,9 +170,11 @@ func (device *Device) RoutineReadFromTUN() { // insert into nonce/pre-handshake queue - peer.timer.handshakeDeadline.Reset(RekeyAttemptTime) - addToOutboundQueue(peer.queue.nonce, elem) - elem = device.NewOutboundElement() + if peer.isRunning.Get() { + peer.timer.handshakeDeadline.Reset(RekeyAttemptTime) + addToOutboundQueue(peer.queue.nonce, elem) + elem = device.NewOutboundElement() + } } } |