1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

device: correct IPC error number for I/O errors

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-01-25 09:21:43 -08:00
parent 37a239e736
commit 87bdcb2ae4

View File

@ -168,7 +168,10 @@ func (device *Device) IpcSetOperation(r io.Reader) (err error) {
}
}
return scanner.Err()
if err := scanner.Err(); err != nil {
return ipcErrorf(ipc.IpcErrorIO, "failed to read input: %w", err)
}
return nil
}
func (device *Device) handleDeviceLine(key, value string) error {