diff options
Diffstat (limited to 'device')
-rw-r--r-- | device/device.go | 3 | ||||
-rw-r--r-- | device/send.go | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/device/device.go b/device/device.go index 586715e..9375448 100644 --- a/device/device.go +++ b/device/device.go @@ -311,7 +311,8 @@ func NewDevice(tunDevice tun.Device, logger *Logger) *Device { go device.RoutineHandshake() } - device.state.stopping.Add(1) // read from TUN + device.state.stopping.Add(1) // RoutineReadFromTUN + device.queue.encryption.wg.Add(1) // RoutineReadFromTUN go device.RoutineReadFromTUN() go device.RoutineTUNEventReader() diff --git a/device/send.go b/device/send.go index 783e5b9..6a3b30b 100644 --- a/device/send.go +++ b/device/send.go @@ -206,6 +206,7 @@ func (device *Device) RoutineReadFromTUN() { defer func() { device.log.Verbosef("Routine: TUN reader - stopped") device.state.stopping.Done() + device.queue.encryption.wg.Done() }() device.log.Verbosef("Routine: TUN reader - started") |