summaryrefslogtreecommitdiffhomepage
path: root/send.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 22:07:58 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 22:07:58 +0200
commitabe2651ad5a22c81bc857366aad3e8e9ade4490d (patch)
tree02d55bfa601f05d1ff15b7790f254f90974f85a7 /send.go
parent34891d92cd36289294d38cd9f26f1fc2456ef26a (diff)
Removed remaining signals from peer
1. Removed remaining signals from peer struct 2. Made needAnotherKeepalive local 3. Removed environment check from warning text (annoying when debugging)
Diffstat (limited to 'send.go')
-rw-r--r--send.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/send.go b/send.go
index 7423e3b..a7c68be 100644
--- a/send.go
+++ b/send.go
@@ -209,8 +209,11 @@ func (peer *Peer) RoutineNonce() {
for {
NextPacket:
+
+ peer.event.flushNonceQueue.Clear()
+
select {
- case <-peer.routines.stop.Wait():
+ case <-peer.routines.stop:
return
case elem, ok := <-peer.queue.nonce:
@@ -239,9 +242,9 @@ func (peer *Peer) RoutineNonce() {
select {
case <-peer.event.newKeyPair.C:
logDebug.Println(peer, ": Obtained awaited key-pair")
- case <-peer.signal.flushNonceQueue:
+ case <-peer.event.flushNonceQueue.C:
goto NextPacket
- case <-peer.routines.stop.Wait():
+ case <-peer.routines.stop:
return
}
}
@@ -368,7 +371,7 @@ func (peer *Peer) RoutineSequentialSender() {
for {
select {
- case <-peer.routines.stop.Wait():
+ case <-peer.routines.stop:
return
case elem, ok := <-peer.queue.outbound: