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:
parent
b34604245e
commit
168ef61a63
5 changed files with 116 additions and 42 deletions
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue