summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-12 16:19:35 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-12 16:19:35 -0600
commitc7cd2c9eab6af6c676bcf286af37d729438fceae (patch)
treebd68849ae92e692d56f06f7040a77d5f199473b1
parent54dbe2471f8ed67f49e8b5e5c92f6f4eb4a5a912 (diff)
device: don't defer unlocking from loop
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--device/mobilequirks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/mobilequirks.go b/device/mobilequirks.go
index a31ce3a..f27d9d7 100644
--- a/device/mobilequirks.go
+++ b/device/mobilequirks.go
@@ -9,8 +9,8 @@ func (device *Device) DisableSomeRoamingForBrokenMobileSemantics() {
device.peers.RLock()
for _, peer := range device.peers.keyMap {
peer.Lock()
- defer peer.Unlock()
peer.disableRoaming = peer.endpoint != nil
+ peer.Unlock()
}
device.peers.RUnlock()
}