summaryrefslogtreecommitdiffhomepage
path: root/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/peer.go b/peer.go
index d8bb2bf..1170720 100644
--- a/peer.go
+++ b/peer.go
@@ -200,7 +200,8 @@ func (peer *Peer) Start() {
return
}
- peer.device.log.Debug.Println("Starting:", peer.String())
+ device := peer.device
+ device.log.Debug.Println(peer.String(), ": Starting...")
// sanity check : these should be 0
@@ -247,7 +248,7 @@ func (peer *Peer) Stop() {
}
device := peer.device
- device.log.Debug.Println("Stopping:", peer.String())
+ device.log.Debug.Println(peer.String(), ": Stopping...")
// stop & wait for ongoing peer routines
@@ -270,6 +271,13 @@ func (peer *Peer) Stop() {
close(peer.queue.outbound)
close(peer.queue.inbound)
+ // close signals
+
+ peer.signal.newKeyPair.Close()
+ peer.signal.handshakeBegin.Close()
+ peer.signal.handshakeCompleted.Close()
+ peer.signal.flushNonceQueue.Close()
+
// clear key pairs
kp := &peer.keyPairs