diff options
Diffstat (limited to 'src/bin/pg_dump/parallel.c')
-rw-r--r-- | src/bin/pg_dump/parallel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index f0587f41e4..4b38ed6c5a 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -1825,10 +1825,15 @@ piperead(int s, char *buf, int len) { int ret = recv(s, buf, len, 0); - if (ret < 0 && WSAGetLastError() == WSAECONNRESET) + if (ret < 0) { - /* EOF on the pipe! */ - ret = 0; + switch (TranslateSocketError()) + { + case ALL_CONNECTION_FAILURE_ERRNOS: + /* Treat connection loss as EOF on the pipe */ + ret = 0; + break; + } } return ret; } |