Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
This commit is contained in:
21
receive.go
21
receive.go
@@ -238,17 +238,8 @@ func (device *Device) RoutineDecryption() {
|
||||
|
||||
logDebug := device.log.Debug
|
||||
defer func() {
|
||||
for {
|
||||
select {
|
||||
case elem, ok := <-device.queue.decryption:
|
||||
if ok {
|
||||
elem.Drop()
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
logDebug.Println("Routine: decryption worker - stopped")
|
||||
device.state.stopping.Done()
|
||||
}()
|
||||
logDebug.Println("Routine: decryption worker - started")
|
||||
|
||||
@@ -313,14 +304,8 @@ func (device *Device) RoutineHandshake() {
|
||||
logDebug := device.log.Debug
|
||||
|
||||
defer func() {
|
||||
for {
|
||||
select {
|
||||
case <-device.queue.handshake:
|
||||
default:
|
||||
return
|
||||
}
|
||||
}
|
||||
logDebug.Println("Routine: handshake worker - stopped")
|
||||
device.state.stopping.Done()
|
||||
}()
|
||||
|
||||
logDebug.Println("Routine: handshake worker - started")
|
||||
@@ -549,8 +534,8 @@ func (peer *Peer) RoutineSequentialReceiver() {
|
||||
logDebug := device.log.Debug
|
||||
|
||||
defer func() {
|
||||
peer.routines.stopping.Done()
|
||||
logDebug.Println(peer, ": Routine: sequential receiver - stopped")
|
||||
peer.routines.stopping.Done()
|
||||
}()
|
||||
|
||||
logDebug.Println(peer, ": Routine: sequential receiver - started")
|
||||
|
||||
Reference in New Issue
Block a user