Fix dummy additions

This commit is contained in:
Jason A. Donenfeld 2018-05-14 03:29:21 +02:00
parent 0fb14232fa
commit e75d2d4496

View file

@ -235,13 +235,12 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
dummy = device.staticIdentity.publicKey.Equals(publicKey)
device.staticIdentity.mutex.RUnlock()
if dummy {
peer = &Peer{}
}
// find peer referenced
} else {
peer = device.LookupPeer(publicKey)
}
if peer == nil {
peer, err = device.NewPeer(publicKey)