ext/libuv/src/unix/stream.c in libuv-2.0.5 vs ext/libuv/src/unix/stream.c in libuv-2.0.6

- old
+ new

@@ -777,13 +777,13 @@ * inside the iov each time we write. So there is no need to offset it. */ if (req->send_handle) { struct msghdr msg; - char scratch[64]; struct cmsghdr *cmsg; int fd_to_send = uv__handle_fd((uv_handle_t*) req->send_handle); + char scratch[64] = {0}; assert(fd_to_send >= 0); msg.msg_name = NULL; msg.msg_namelen = 0; @@ -1469,10 +1469,10 @@ if (!has_pollout) { uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT); uv__stream_osx_interrupt_select(stream); } - if (written == 0) + if (written == 0 && req_size != 0) return -EAGAIN; else return written; }