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