Skip to content

Instantly share code, notes, and snippets.

@saghul
Created April 23, 2015 14:55
Show Gist options
  • Save saghul/1dd8b43b4c7a7edae212 to your computer and use it in GitHub Desktop.
Save saghul/1dd8b43b4c7a7edae212 to your computer and use it in GitHub Desktop.
commit ab852fb4a6b6bb55e82c8cf95f91f37e1a98065f
Author: Saúl Ibarra Corretgé <[email protected]>
Date: Thu Apr 23 16:54:09 2015 +0200
unix: make sure we make an extra loop iteration after uv_pipe_connect
diff --git a/src/unix/pipe.c b/src/unix/pipe.c
index e0f448e..37dff37 100644
--- a/src/unix/pipe.c
+++ b/src/unix/pipe.c
@@ -197,8 +197,10 @@ out:
QUEUE_INIT(&req->queue);
/* Force callback to run on next tick in case of error. */
- if (err)
+ if (err) {
uv__io_feed(handle->loop, &handle->io_watcher);
+ uv__async_send(&handle->loop->async_watcher);
+ }
/* Mimic the Windows pipe implementation, always
* return 0 and let the callback handle errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment