summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--send.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/send.go b/send.go
index a670c4d..9a59abd 100644
--- a/send.go
+++ b/send.go
@@ -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()