summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-19 11:10:05 -0800
committerJosh Bleecher Snyder <josh@tailscale.com>2021-02-08 08:18:32 -0800
commit84a42aed63c1bb2c6de0774dc568ab1c77a22b33 (patch)
tree66bbd65e31d33546efd341192abb94f8dd2494d0 /device/device.go
parent4192036acd3b6442a60a5852b78979dde4b53ba5 (diff)
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 <josh@tailscale.com>
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/device.go b/device/device.go
index d860ed3..a7838b5 100644
--- a/device/device.go
+++ b/device/device.go
@@ -340,9 +340,9 @@ func NewDevice(tunDevice tun.Device, logger *Logger) *Device {
cpus := runtime.NumCPU()
device.state.stopping.Wait()
for i := 0; i < cpus; i++ {
- device.state.stopping.Add(2) // decryption and handshake
go device.RoutineEncryption()
go device.RoutineDecryption()
+ device.state.stopping.Add(1) // handshake
go device.RoutineHandshake()
}