unix: uv_pipe_connect should call uv__stream_open

This commit is contained in:
Ryan Dahl 2011-08-10 14:21:32 -07:00
parent b8fe56d837
commit db190c7b4f

View File

@ -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);