From ca08b48252230db27592248aef10c2d1779bccce Mon Sep 17 00:00:00 2001 From: Milad Farazmand Date: Fri, 6 Sep 2019 09:59:33 +0200 Subject: [PATCH] aix: replace ECONNRESET with EOF if already closed PR-URL: https://github.com/libuv/libuv/pull/2447 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: Richard Lau --- src/unix/stream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix/stream.c b/src/unix/stream.c index 55b753c0..78ce8e84 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1180,6 +1180,10 @@ static void uv__read(uv_stream_t* stream) { } else if (errno == ECONNRESET && stream->type == UV_NAMED_PIPE) { uv__stream_eof(stream, &buf); return; +#elif defined(_AIX) + } else if (errno == ECONNRESET && (stream->flags & UV_DISCONNECT)) { + uv__stream_eof(stream, &buf); + return; #endif } else { /* Error. User should call uv_close(). */