device: remove device.state.stopping from RoutineHandshake
It is no longer necessary. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
84a42aed63
commit
9c75f58f3d
@ -342,7 +342,6 @@ func NewDevice(tunDevice tun.Device, logger *Logger) *Device {
|
|||||||
for i := 0; i < cpus; i++ {
|
for i := 0; i < cpus; i++ {
|
||||||
go device.RoutineEncryption()
|
go device.RoutineEncryption()
|
||||||
go device.RoutineDecryption()
|
go device.RoutineDecryption()
|
||||||
device.state.stopping.Add(1) // handshake
|
|
||||||
go device.RoutineHandshake()
|
go device.RoutineHandshake()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,10 +240,7 @@ func (device *Device) RoutineDecryption() {
|
|||||||
/* Handles incoming packets related to handshake
|
/* Handles incoming packets related to handshake
|
||||||
*/
|
*/
|
||||||
func (device *Device) RoutineHandshake() {
|
func (device *Device) RoutineHandshake() {
|
||||||
defer func() {
|
defer device.log.Verbosef("Routine: handshake worker - stopped")
|
||||||
device.log.Verbosef("Routine: handshake worker - stopped")
|
|
||||||
device.state.stopping.Done()
|
|
||||||
}()
|
|
||||||
device.log.Verbosef("Routine: handshake worker - started")
|
device.log.Verbosef("Routine: handshake worker - started")
|
||||||
|
|
||||||
for elem := range device.queue.handshake.c {
|
for elem := range device.queue.handshake.c {
|
||||||
|
Loading…
Reference in New Issue
Block a user