device: remove dead code

If device.NewPeer returns a nil error,
then the returned peer is always non-nil.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-01-15 13:59:55 -08:00
parent 675aae2423
commit db3fa1409c

View File

@ -247,13 +247,8 @@ func (device *Device) IpcSetOperation(r io.Reader) error {
logError.Println("Failed to create new peer:", err)
return &IPCError{ipc.IpcErrorInvalid}
}
if peer == nil {
dummy = true
peer = &Peer{}
} else {
logDebug.Println(peer, "- UAPI: Created")
}
}
case "update_only":