Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

unix: return UV_UNKNOWN_HANDLE when read2 doesn't recv one

unix passes ipc test on this comment.
  • Loading branch information...
commit 0d20e0e3438c5f83285beede15a6725fa772138b 1 parent cbca726
@ry ry authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/unix/stream.c
View
7 src/unix/stream.c
@@ -593,7 +593,12 @@ static void uv__read(uv_stream_t* stream) {
}
}
- stream->read2_cb((uv_pipe_t*)stream, nread, buf, UV_TCP);
+
+ if (stream->accepted_fd >= 0) {
+ stream->read2_cb((uv_pipe_t*)stream, nread, buf, UV_TCP);
+ } else {
+ stream->read2_cb((uv_pipe_t*)stream, nread, buf, UV_UNKNOWN_HANDLE);
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.