diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2021-01-25 09:21:43 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josh@tailscale.com> | 2021-01-25 09:35:48 -0800 |
commit | 87bdcb2ae472711c3b0b3679fbdb393e39b4dbc3 (patch) | |
tree | bac39f6073bd45c0f886d9b17269247671b8d5d0 | |
parent | 37a239e7360dd38e513fd7d717ce50de6d8215ff (diff) |
device: correct IPC error number for I/O errors
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-rw-r--r-- | device/uapi.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/device/uapi.go b/device/uapi.go index 160806d..90a9952 100644 --- a/device/uapi.go +++ b/device/uapi.go @@ -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 { |