diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-05 05:33:29 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-05 05:33:29 +0200 |
commit | 09a9bc289990e3f377a331626b0102283d6f83f4 (patch) | |
tree | 109a871092f78672e405a02e034c585d1882b8e0 | |
parent | 34891d92cd36289294d38cd9f26f1fc2456ef26a (diff) | |
download | wireguard-go-09a9bc289990e3f377a331626b0102283d6f83f4.tar.gz wireguard-go-09a9bc289990e3f377a331626b0102283d6f83f4.zip |
Fix infinite loop in exit routine
-rw-r--r-- | receive.go | 6 | ||||
-rw-r--r-- | send.go | 3 |
2 files changed, 6 insertions, 3 deletions
@@ -245,9 +245,10 @@ func (device *Device) RoutineDecryption() { elem.Drop() } default: - break + goto out } } + out: logDebug.Println("Routine: decryption worker - stopped") }() logDebug.Println("Routine: decryption worker - started") @@ -317,9 +318,10 @@ func (device *Device) RoutineHandshake() { select { case <-device.queue.handshake: default: - return + goto out } } + out: logDebug.Println("Routine: handshake worker - stopped") }() @@ -281,9 +281,10 @@ func (device *Device) RoutineEncryption() { elem.Drop() } default: - break + goto out } } + out: logDebug.Println("Routine: encryption worker - stopped") }() |