From 84a42aed63c1bb2c6de0774dc568ab1c77a22b33 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 19 Jan 2021 11:10:05 -0800 Subject: device: remove device.state.stopping from RoutineDecryption It is no longer necessary, as of 454de6f3e64abd2a7bf9201579cd92eea5280996 (device: use channel close to shut down and drain decryption channel). Signed-off-by: Josh Bleecher Snyder --- device/receive.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'device/receive.go') diff --git a/device/receive.go b/device/receive.go index 0b70137..3b0f36c 100644 --- a/device/receive.go +++ b/device/receive.go @@ -210,10 +210,8 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind conn.Bind) { func (device *Device) RoutineDecryption() { var nonce [chacha20poly1305.NonceSize]byte - defer func() { - device.log.Verbosef("Routine: decryption worker - stopped") - device.state.stopping.Done() - }() + + defer device.log.Verbosef("Routine: decryption worker - stopped") device.log.Verbosef("Routine: decryption worker - started") for elem := range device.queue.decryption.c { -- cgit v1.2.3