diff options
Diffstat (limited to 'device')
-rw-r--r-- | device/send.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/device/send.go b/device/send.go index eb861b1..04d2001 100644 --- a/device/send.go +++ b/device/send.go @@ -286,12 +286,12 @@ func (peer *Peer) StagePacket(elem *QueueOutboundElement) { case peer.queue.staged <- elem: return default: - select { - case tooOld := <-peer.queue.staged: - peer.device.PutMessageBuffer(tooOld.buffer) - peer.device.PutOutboundElement(tooOld) - default: - } + } + select { + case tooOld := <-peer.queue.staged: + peer.device.PutMessageBuffer(tooOld.buffer) + peer.device.PutOutboundElement(tooOld) + default: } } } |