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,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 {