diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-05-05 22:10:22 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-05-05 22:10:22 +0200 |
commit | 375dcbd4aefc8054700dcb072a5e74a9ed7e9d39 (patch) | |
tree | 9773f9d6868a37faa0dadf2d162b89763e5fc9d1 /send.go | |
parent | abe2651ad5a22c81bc857366aad3e8e9ade4490d (diff) | |
parent | c29428b075aa4476f3f3f0b97e580c2f4b8bb683 (diff) |
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Diffstat (limited to 'send.go')
-rw-r--r-- | send.go | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -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") |