Fix dummy additions
This commit is contained in:
parent
0fb14232fa
commit
e75d2d4496
7
uapi.go
7
uapi.go
@ -235,13 +235,12 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
|
|||||||
dummy = device.staticIdentity.publicKey.Equals(publicKey)
|
dummy = device.staticIdentity.publicKey.Equals(publicKey)
|
||||||
device.staticIdentity.mutex.RUnlock()
|
device.staticIdentity.mutex.RUnlock()
|
||||||
|
|
||||||
|
|
||||||
if dummy {
|
if dummy {
|
||||||
peer = &Peer{}
|
peer = &Peer{}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
// find peer referenced
|
|
||||||
|
|
||||||
peer = device.LookupPeer(publicKey)
|
peer = device.LookupPeer(publicKey)
|
||||||
|
}
|
||||||
|
|
||||||
if peer == nil {
|
if peer == nil {
|
||||||
peer, err = device.NewPeer(publicKey)
|
peer, err = device.NewPeer(publicKey)
|
||||||
|
Loading…
Reference in New Issue
Block a user