summaryrefslogtreecommitdiffhomepage
path: root/src/receive.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-17 16:16:18 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-17 16:16:18 +0200
commitc5d7efc2467abb6cd8365c83fae68da6924c17f2 (patch)
tree0324219cf4979a87fc45fc575e26f7058b0a196f /src/receive.go
parentdd4da93749fd9a8a231942a6b75ad137cc308e02 (diff)
Fixed deadlock in index.go
Diffstat (limited to 'src/receive.go')
-rw-r--r--src/receive.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/receive.go b/src/receive.go
index 31f74e2..e063c99 100644
--- a/src/receive.go
+++ b/src/receive.go
@@ -212,18 +212,18 @@ func (device *Device) RoutineReceiveIncomming() {
// add to peer queue
peer := value.peer
- work := &QueueInboundElement{
+ elem := &QueueInboundElement{
packet: packet,
buffer: buffer,
keyPair: keyPair,
dropped: AtomicFalse,
}
- work.mutex.Lock()
+ elem.mutex.Lock()
// add to decryption queues
- device.addToInboundQueue(device.queue.decryption, work)
- device.addToInboundQueue(peer.queue.inbound, work)
+ device.addToInboundQueue(device.queue.decryption, elem)
+ device.addToInboundQueue(peer.queue.inbound, elem)
buffer = nil
default: