summaryrefslogtreecommitdiffhomepage
path: root/send.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 22:10:22 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 22:10:22 +0200
commit375dcbd4aefc8054700dcb072a5e74a9ed7e9d39 (patch)
tree9773f9d6868a37faa0dadf2d162b89763e5fc9d1 /send.go
parentabe2651ad5a22c81bc857366aad3e8e9ade4490d (diff)
parentc29428b075aa4476f3f3f0b97e580c2f4b8bb683 (diff)
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Diffstat (limited to 'send.go')
-rw-r--r--send.go15
1 files changed, 3 insertions, 12 deletions
diff --git a/send.go b/send.go
index a7c68be..ddebb99 100644
--- a/send.go
+++ b/send.go
@@ -200,8 +200,8 @@ func (peer *Peer) RoutineNonce() {
logDebug := device.log.Debug
defer func() {
- peer.routines.stopping.Done()
logDebug.Println(peer, ": Routine: nonce worker - stopped")
+ peer.routines.stopping.Done()
}()
peer.routines.starting.Done()
@@ -277,17 +277,8 @@ func (device *Device) RoutineEncryption() {
logDebug := device.log.Debug
defer func() {
- for {
- select {
- case elem, ok := <-device.queue.encryption:
- if ok {
- elem.Drop()
- }
- default:
- break
- }
- }
logDebug.Println("Routine: encryption worker - stopped")
+ device.state.stopping.Done()
}()
logDebug.Println("Routine: encryption worker - started")
@@ -360,8 +351,8 @@ func (peer *Peer) RoutineSequentialSender() {
logDebug := device.log.Debug
defer func() {
- peer.routines.stopping.Done()
logDebug.Println(peer, ": Routine: sequential sender - stopped")
+ peer.routines.stopping.Done()
}()
logDebug.Println(peer, ": Routine: sequential sender - started")