diff options
author | Filippo Valsorda <hi@filippo.io> | 2018-05-20 23:12:55 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-21 20:20:13 +0200 |
commit | 7bdc5eb54ed7ac45016e6e028913f1594471a074 (patch) | |
tree | b53aaf5d0bb00cf84c6ea65e72510298c760c7f2 /tun.go | |
parent | 1c666576d584fd827dfcefdbabe797f391487624 (diff) |
Properly close DummyTUN to avoid deadlock in TestNoiseHandshake
License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
Diffstat (limited to 'tun.go')
-rw-r--r-- | tun.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -33,9 +33,11 @@ type TUNDevice interface { func (device *Device) RoutineTUNEventReader() { setUp := false + logDebug := device.log.Debug logInfo := device.log.Info logError := device.log.Error + logDebug.Println("Routine: event worker - started") device.state.starting.Done() for event := range device.tun.device.Events() { @@ -67,5 +69,6 @@ func (device *Device) RoutineTUNEventReader() { } } + logDebug.Println("Routine: event worker - stopped") device.state.stopping.Done() } |