summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device/device.go1
-rw-r--r--device/receive.go5
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 {