mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-04-17 22:46:54 +02:00
Do not send keepalive if closed
This commit is contained in:
parent
27091c3284
commit
cf161f270e
1 changed files with 1 additions and 1 deletions
2
send.go
2
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()
|
||||
|
|
Loading…
Add table
Reference in a new issue