uv: upgrade to 0db3274
authorBen Noordhuis <info@bnoordhuis.nl>
Tue, 6 Dec 2011 17:09:43 +0000 (18:09 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 6 Dec 2011 21:02:26 +0000 (22:02 +0100)
deps/uv/src/unix/stream.c

index 2573781..035e638 100644 (file)
@@ -341,6 +341,13 @@ static void uv__write(uv_stream_t* stream) {
   int iovcnt;
   ssize_t n;
 
+  if (stream->flags & UV_CLOSING) {
+    /* Handle was closed this tick. We've received a stale
+     * 'is writable' callback from the event loop, ignore.
+     */
+    return;
+  }
+
 start:
 
   assert(stream->fd >= 0);