diff --git a/lib/searpc-named-pipe-transport.c b/lib/searpc-named-pipe-transport.c index ea3fc4f..8297286 100644 --- a/lib/searpc-named-pipe-transport.c +++ b/lib/searpc-named-pipe-transport.c @@ -499,6 +499,9 @@ ssize_t pipe_read_n (SearpcNamedPipe fd, void *vptr, size_t n) NULL); // not overlapped I/O if (!success || bytes_read != (DWORD)n) { + if (GetLastError() == ERROR_BROKEN_PIPE) { + return 0; + } G_WARNING_WITH_LAST_ERROR("failed to read from pipe"); return -1; }