Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-09-25 22:16:02 +0300
committerAnna Henningsen <anna@addaleax.net>2018-05-10 15:15:16 +0300
commitcac8496c2ff592198a7afd114610deccb0e178ab (patch)
treef71985006d0cb1f2348d37c60d5f617db9622439 /src/pipe_wrap.cc
parent17e289eca8f8398243df5c4006d80f7381fd08bc (diff)
src: unify ReqWrap libuv calling
This allows easier tracking of whether there are active `ReqWrap`s. Many thanks for Stephen Belanger for reviewing the original version of this commit in the Ayo.js project. Refs: https://github.com/ayojs/ayo/pull/85 PR-URL: https://github.com/nodejs/node/pull/19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r--src/pipe_wrap.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index da7cb9e3ab5..7ec5bdf15be 100644
--- a/src/pipe_wrap.cc
+++ b/src/pipe_wrap.cc
@@ -224,11 +224,10 @@ void PipeWrap::Connect(const FunctionCallbackInfo<Value>& args) {
ConnectWrap* req_wrap =
new ConnectWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPECONNECTWRAP);
- uv_pipe_connect(req_wrap->req(),
- &wrap->handle_,
- *name,
- AfterConnect);
- req_wrap->Dispatched();
+ req_wrap->Dispatch(uv_pipe_connect,
+ &wrap->handle_,
+ *name,
+ AfterConnect);
args.GetReturnValue().Set(0); // uv_pipe_connect() doesn't return errors.
}