diff options
Diffstat (limited to 'device/receive.go')
-rw-r--r-- | device/receive.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/device/receive.go b/device/receive.go index 4b6f278..0bd22bf 100644 --- a/device/receive.go +++ b/device/receive.go @@ -251,7 +251,20 @@ func (device *Device) RoutineDecryption() { for { select { case <-device.signals.stop: - return + for { + select { + case elem, ok := <-device.queue.decryption: + if ok { + if !elem.IsDropped() { + elem.Drop() + device.PutMessageBuffer(elem.buffer) + } + elem.Unlock() + } + default: + return + } + } case elem, ok := <-device.queue.decryption: |