mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-16 13:41:24 +08:00
Add missing locks and fix debug output, and try to flush queues
Flushing queues on exit is sort of a partial solution, but this could be better. Really what we want is for no more packets to be enqueued after isUp is set to false.
This commit is contained in:
4
peer.go
4
peer.go
@@ -195,7 +195,7 @@ func (peer *Peer) Start() {
|
||||
}
|
||||
|
||||
device := peer.device
|
||||
device.log.Debug.Println(peer.String(), ": Starting...")
|
||||
device.log.Debug.Println(peer.String() + ": Starting...")
|
||||
|
||||
// sanity check : these should be 0
|
||||
|
||||
@@ -242,7 +242,7 @@ func (peer *Peer) Stop() {
|
||||
}
|
||||
|
||||
device := peer.device
|
||||
device.log.Debug.Println(peer.String(), ": Stopping...")
|
||||
device.log.Debug.Println(peer.String() + ": Stopping...")
|
||||
|
||||
// stop & wait for ongoing peer routines
|
||||
|
||||
|
Reference in New Issue
Block a user