aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext/completion_queue_uv.cc
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2017-04-13 16:07:14 -0700
committerGravatar GitHub <noreply@github.com>2017-04-13 16:07:14 -0700
commitbdb102106b7d879214a2f84216d17ca56d1162ee (patch)
treee58ffd0bd9dacd30fca9d22074f340155fa654ad /src/node/ext/completion_queue_uv.cc
parente98cf24f487d1d4970336ecd35bb99707b684b7e (diff)
parenta41fd5b0861f01a7be447eb3abfd903a6f623fa8 (diff)
Merge pull request #10617 from murgatroid99/upmerge_1.2.4
Upmerge 1.2.4 into master
Diffstat (limited to 'src/node/ext/completion_queue_uv.cc')
-rw-r--r--src/node/ext/completion_queue_uv.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/node/ext/completion_queue_uv.cc b/src/node/ext/completion_queue_uv.cc
index 615973a6c9..0f6f7da460 100644
--- a/src/node/ext/completion_queue_uv.cc
+++ b/src/node/ext/completion_queue_uv.cc
@@ -61,17 +61,13 @@ void drain_completion_queue(uv_prepare_t *handle) {
queue, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL);
if (event.type == GRPC_OP_COMPLETE) {
- Nan::Callback *callback = grpc::node::GetTagCallback(event.tag);
+ const char *error_message;
if (event.success) {
- Local<Value> argv[] = {Nan::Null(),
- grpc::node::GetTagNodeValue(event.tag)};
- callback->Call(2, argv);
+ error_message = NULL;
} else {
- Local<Value> argv[] = {Nan::Error(
- "The async function encountered an error")};
- callback->Call(1, argv);
+ error_message = "The async function encountered an error";
}
- grpc::node::CompleteTag(event.tag);
+ CompleteTag(event.tag, error_message);
grpc::node::DestroyTag(event.tag);
pending_batches--;
if (pending_batches == 0) {