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/udp_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/udp_wrap.cc')
-rw-r--r--src/udp_wrap.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index 414fe07eab6..1d1ded449bd 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -380,15 +380,14 @@ void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) {
}
if (err == 0) {
- err = uv_udp_send(req_wrap->req(),
- &wrap->handle_,
- *bufs,
- count,
- reinterpret_cast<const sockaddr*>(&addr),
- OnSend);
+ err = req_wrap->Dispatch(uv_udp_send,
+ &wrap->handle_,
+ *bufs,
+ count,
+ reinterpret_cast<const sockaddr*>(&addr),
+ OnSend);
}
- req_wrap->Dispatched();
if (err)
delete req_wrap;