summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-12 15:04:32 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-20 19:56:59 +0100
commit0cc15e7c7c6fc2917cb1cea8ea3f10f7d375cac4 (patch)
tree5eb1f21f046a3e0fa4c2e4cff7c324a3f524b76f
parent48c3b87eb824deb1cb3178a7cdd42276dbc70d2d (diff)
device: put handshake buffer in pool in FlushPacketQueues
This appears to have been an oversight. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-rw-r--r--device/device.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/device/device.go b/device/device.go
index 9a9b1b3..d18192e 100644
--- a/device/device.go
+++ b/device/device.go
@@ -387,7 +387,8 @@ func (device *Device) RemoveAllPeers() {
func (device *Device) FlushPacketQueues() {
for {
select {
- case <-device.queue.handshake:
+ case elem := <-device.queue.handshake:
+ device.PutMessageBuffer(elem.buffer)
default:
return
}