Fixed shadowing bug

This commit is contained in:
Mathias Hall-Andersen 2017-07-27 23:51:07 +02:00
parent 92135131a7
commit 1fb00e8045

View file

@ -153,7 +153,7 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
return &IPCError{Code: ipcErrorInvalidValue}
}
device.mutex.RLock()
peer, _ := device.peers[pubKey]
peer, _ = device.peers[pubKey]
device.mutex.RUnlock()
if peer == nil {
peer = device.NewPeer(pubKey)