From db190c7b4f1aee1db8160a6c4f427ec44bd1bfb3 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 10 Aug 2011 14:21:32 -0700 Subject: [PATCH] unix: uv_pipe_connect should call uv__stream_open --- src/uv-unix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/uv-unix.c b/src/uv-unix.c index e64c280d..48357016 100644 --- a/src/uv-unix.c +++ b/src/uv-unix.c @@ -1981,9 +1981,8 @@ int uv_pipe_connect(uv_connect_t* req, goto out; } - handle->fd = sockfd; - ev_io_init(&handle->read_watcher, uv__stream_io, sockfd, EV_READ); - ev_io_init(&handle->write_watcher, uv__stream_io, sockfd, EV_WRITE); + uv__stream_open((uv_stream_t*)handle, sockfd, UV_READABLE | UV_WRITABLE); + ev_io_start(EV_DEFAULT_ &handle->read_watcher); ev_io_start(EV_DEFAULT_ &handle->write_watcher);