diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-10 00:39:28 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-10 00:39:28 +0100 |
commit | 484a9fd32494176526e0ffe81413e73362a6f92d (patch) | |
tree | 96bfde8f3f0f94e8d84ca9e811b01215df754dca /device/peer.go | |
parent | 5bf8d731273e0c03b84b6424f00e70b87afb248f (diff) |
device: flush peer queues before starting device
In case some old packets snuck in there before, this flushes before
starting afresh.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/peer.go')
-rw-r--r-- | device/peer.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/device/peer.go b/device/peer.go index 40de59b..a3b428a 100644 --- a/device/peer.go +++ b/device/peer.go @@ -186,6 +186,8 @@ func (peer *Peer) Start() { peer.timersStart() + device.flushInboundQueue(peer.queue.inbound) + device.flushOutboundQueue(peer.queue.outbound) go peer.RoutineSequentialSender() go peer.RoutineSequentialReceiver() |