diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-15 13:29:52 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-15 13:29:52 +0200 |
commit | cf161f270e208cbe36a400c12f194f1f353db31e (patch) | |
tree | 78c283df2039cb57728da4ab14d999f4f2272f00 | |
parent | 27091c32841bf074bec60f46fea1954c455233d9 (diff) |
Do not send keepalive if closed
-rw-r--r-- | send.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -107,7 +107,7 @@ func addToEncryptionQueue( /* Queues a keepalive if no packets are queued for peer */ func (peer *Peer) SendKeepalive() bool { - if len(peer.queue.nonce) != 0 || peer.queue.packetInNonceQueueIsAwaitingKey { + if len(peer.queue.nonce) != 0 || peer.queue.packetInNonceQueueIsAwaitingKey || !peer.isRunning.Get() { return false } elem := peer.device.NewOutboundElement() |