diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2021-02-02 16:14:54 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josh@tailscale.com> | 2021-02-08 08:18:32 -0800 |
commit | 9c75f58f3d8656e9e5394959a67b630f51f9dc98 (patch) | |
tree | 31708498db3e91310da55f85e3359eefc043a148 | |
parent | 84a42aed63c1bb2c6de0774dc568ab1c77a22b33 (diff) |
device: remove device.state.stopping from RoutineHandshake
It is no longer necessary.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-rw-r--r-- | device/device.go | 1 | ||||
-rw-r--r-- | device/receive.go | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/device/device.go b/device/device.go index a7838b5..9ea7c24 100644 --- a/device/device.go +++ b/device/device.go @@ -342,7 +342,6 @@ func NewDevice(tunDevice tun.Device, logger *Logger) *Device { for i := 0; i < cpus; i++ { go device.RoutineEncryption() go device.RoutineDecryption() - device.state.stopping.Add(1) // handshake go device.RoutineHandshake() } diff --git a/device/receive.go b/device/receive.go index 3b0f36c..21d9dbc 100644 --- a/device/receive.go +++ b/device/receive.go @@ -240,10 +240,7 @@ func (device *Device) RoutineDecryption() { /* Handles incoming packets related to handshake */ func (device *Device) RoutineHandshake() { - defer func() { - device.log.Verbosef("Routine: handshake worker - stopped") - device.state.stopping.Done() - }() + defer device.log.Verbosef("Routine: handshake worker - stopped") device.log.Verbosef("Routine: handshake worker - started") for elem := range device.queue.handshake.c { |