diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-17 16:16:18 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-17 16:16:18 +0200 |
commit | c5d7efc2467abb6cd8365c83fae68da6924c17f2 (patch) | |
tree | 0324219cf4979a87fc45fc575e26f7058b0a196f /src/receive.go | |
parent | dd4da93749fd9a8a231942a6b75ad137cc308e02 (diff) |
Fixed deadlock in index.go
Diffstat (limited to 'src/receive.go')
-rw-r--r-- | src/receive.go | 8 |
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: |