diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-02-26 18:08:30 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-02-26 18:08:30 -0800 |
commit | cd08c8a0e5e99ed4933b87fc5e188afcd4299f73 (patch) | |
tree | c05e93d47f89df1f7a782ee9c70bb2c97d557cd4 /deps/uv/src/unix/stream.c | |
parent | f3189ace6b5e31a874df421ac2f74da0e77cb14d (diff) | |
download | android-node-v8-cd08c8a0e5e99ed4933b87fc5e188afcd4299f73.tar.gz android-node-v8-cd08c8a0e5e99ed4933b87fc5e188afcd4299f73.tar.bz2 android-node-v8-cd08c8a0e5e99ed4933b87fc5e188afcd4299f73.zip |
uv: Upgrade to v0.11.21
Diffstat (limited to 'deps/uv/src/unix/stream.c')
-rw-r--r-- | deps/uv/src/unix/stream.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 9f5d40cf4b..ad6856b4b7 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -301,6 +301,7 @@ int uv__stream_try_select(uv_stream_t* stream, int* fd) { int err; int ret; int kq; + int old_fd; kq = kqueue(); if (kq == -1) { @@ -353,16 +354,20 @@ int uv__stream_try_select(uv_stream_t* stream, int* fd) { s->fake_fd = fds[0]; s->int_fd = fds[1]; - if (uv_thread_create(&s->thread, uv__stream_osx_select, stream)) - goto fatal4; - + old_fd = *fd; s->stream = stream; stream->select = s; *fd = s->fake_fd; + if (uv_thread_create(&s->thread, uv__stream_osx_select, stream)) + goto fatal4; + return 0; fatal4: + s->stream = NULL; + stream->select = NULL; + *fd = old_fd; uv__close(s->fake_fd); uv__close(s->int_fd); s->fake_fd = -1; @@ -1103,6 +1108,7 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) { if (!(stream->flags & UV_STREAM_WRITABLE) || stream->flags & UV_STREAM_SHUT || + stream->flags & UV_STREAM_SHUTTING || stream->flags & UV_CLOSED || stream->flags & UV_CLOSING) { return -ENOTCONN; @@ -1505,7 +1511,5 @@ void uv__stream_close(uv_stream_t* handle) { int uv_stream_set_blocking(uv_stream_t* handle, int blocking) { - assert(0 && "implement me"); - abort(); - return 0; + return UV_ENOSYS; } |