aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-05 06:09:30 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-05 06:09:30 +0200
commitc29428b075aa4476f3f3f0b97e580c2f4b8bb683 (patch)
treeb3aaa9afc4008183272c6c959802e8a5c6aedb2c
parentMore robust solution to close deadlock (diff)
downloadwireguard-go-c29428b075aa4476f3f3f0b97e580c2f4b8bb683.tar.xz
wireguard-go-c29428b075aa4476f3f3f0b97e580c2f4b8bb683.zip
Reorder stopping messages so that logs are coherent
-rw-r--r--receive.go6
-rw-r--r--send.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/receive.go b/receive.go
index e323c6d..d4245af 100644
--- a/receive.go
+++ b/receive.go
@@ -238,8 +238,8 @@ func (device *Device) RoutineDecryption() {
logDebug := device.log.Debug
defer func() {
- device.state.stopping.Done()
logDebug.Println("Routine: decryption worker - stopped")
+ device.state.stopping.Done()
}()
logDebug.Println("Routine: decryption worker - started")
@@ -304,8 +304,8 @@ func (device *Device) RoutineHandshake() {
logDebug := device.log.Debug
defer func() {
- device.state.stopping.Done()
logDebug.Println("Routine: handshake worker - stopped")
+ device.state.stopping.Done()
}()
logDebug.Println("Routine: handshake worker - started")
@@ -534,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")
diff --git a/send.go b/send.go
index e41be83..4ed084d 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()
@@ -274,8 +274,8 @@ func (device *Device) RoutineEncryption() {
logDebug := device.log.Debug
defer func() {
- device.state.stopping.Done()
logDebug.Println("Routine: encryption worker - stopped")
+ device.state.stopping.Done()
}()
logDebug.Println("Routine: encryption worker - started")
@@ -348,8 +348,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")