Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-07-21 05:42:39 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2011-07-21 05:51:23 +0400
commit1b89323e92001481f7b0e1f14736d288b58b160e (patch)
tree62af326a0dc39b01ed0b43d9478efed8c068221b /deps
parent53aac9dde614bb5426c681ab9ba631bd5c33b1a3 (diff)
uv: back-port c4611a4 from libuv
Diffstat (limited to 'deps')
-rw-r--r--deps/uv/src/uv-unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/deps/uv/src/uv-unix.c b/deps/uv/src/uv-unix.c
index d583c37847c..e614f0f7b1c 100644
--- a/deps/uv/src/uv-unix.c
+++ b/deps/uv/src/uv-unix.c
@@ -870,13 +870,13 @@ static void uv__stream_io(EV_P_ ev_io* watcher, int revents) {
stream->type == UV_NAMED_PIPE);
assert(watcher == &stream->read_watcher ||
watcher == &stream->write_watcher);
- assert(stream->fd >= 0);
assert(!uv_flag_is_set((uv_handle_t*)stream, UV_CLOSING));
if (stream->connect_req) {
uv__stream_connect(stream);
} else {
assert(revents & (EV_READ | EV_WRITE));
+ assert(stream->fd >= 0);
if (revents & EV_READ) {
uv__read((uv_stream_t*)stream);
@@ -908,7 +908,6 @@ static void uv__stream_connect(uv_stream_t* stream) {
socklen_t errorsize = sizeof(int);
assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE);
- assert(stream->fd >= 0);
assert(req);
if (stream->delayed_error) {
@@ -920,6 +919,7 @@ static void uv__stream_connect(uv_stream_t* stream) {
stream->delayed_error = 0;
} else {
/* Normal situation: we need to get the socket error from the kernel. */
+ assert(stream->fd >= 0);
getsockopt(stream->fd, SOL_SOCKET, SO_ERROR, &error, &errorsize);
}