summaryrefslogtreecommitdiff
path: root/send.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-17 00:43:23 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-22 05:43:03 +0200
commitcf81a28dd30bd8714432d2ff108d64c7f4b65e50 (patch)
treef2b2c502c22ad6b3d006c289f28fd897f4c703a5 /send.go
parent942abf948a9121a4595f782093ca623534997776 (diff)
downloadwireguard-go-cf81a28dd30bd8714432d2ff108d64c7f4b65e50.tar.gz
wireguard-go-cf81a28dd30bd8714432d2ff108d64c7f4b65e50.zip
Fixup buffer freeing
Diffstat (limited to 'send.go')
-rw-r--r--send.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/send.go b/send.go
index bc0f5e4..24e2f39 100644
--- a/send.go
+++ b/send.go
@@ -74,8 +74,7 @@ func addToNonceQueue(queue chan *QueueOutboundElement, element *QueueOutboundEle
default:
select {
case old := <-queue:
- old.Drop()
- device.PutMessageBuffer(element.buffer)
+ device.PutMessageBuffer(old.buffer)
default:
}
}
@@ -98,7 +97,6 @@ func addToOutboundAndEncryptionQueues(outboundQueue chan *QueueOutboundElement,
}
}
-
/* Queues a keepalive if no packets are queued for peer
*/
func (peer *Peer) SendKeepalive() bool {