unix: return UV_UNKNOWN_HANDLE when read2 doesn't recv one

unix passes ipc test on this comment.
This commit is contained in:
Ryan Dahl 2011-10-04 14:44:16 -07:00
parent c920db9fd1
commit 61fab8d1ba

View File

@ -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);
}
}
}
}