summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/device/device.go b/device/device.go
index 3172224..d37fe6f 100644
--- a/device/device.go
+++ b/device/device.go
@@ -371,7 +371,10 @@ func (device *Device) FlushPacketQueues() {
select {
case elem, ok := <-device.queue.decryption:
if ok {
- elem.Drop()
+ if !elem.IsDropped() {
+ elem.Drop()
+ device.PutMessageBuffer(elem.buffer)
+ }
}
case <-device.queue.handshake:
default: