Clean up error handling of listen port

This commit is contained in:
Jason A. Donenfeld
2017-09-26 15:15:27 +02:00
parent 012e7b9d33
commit 6fa65bded4
4 changed files with 6 additions and 6 deletions

View File

@@ -151,7 +151,7 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {
err = updateUDPConn(device)
if err != nil {
logError.Println("Failed to set listen_port:", err)
return &IPCError{Code: ipcErrorIO}
return &IPCError{Code: ipcErrorPortInUse}
}
// TODO: Clear source address of all peers