aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-03-17 11:49:24 -0700
committerGravatar murgatroid99 <mlumish@google.com>2016-03-17 11:49:24 -0700
commit4718a387fd5716b606ad667be884ec798b83a9c5 (patch)
treebea19f5316750d2f53aaa502b812b144d92bd5bb /src/node/ext
parent25269f07c9845253b38595066aabab1ec56aa2b3 (diff)
Unref uv_async after construction to avoid blocking at shutdown
Diffstat (limited to 'src/node/ext')
-rw-r--r--src/node/ext/call_credentials.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/ext/call_credentials.cc b/src/node/ext/call_credentials.cc
index a2ac5c17b6..bd2d146bbc 100644
--- a/src/node/ext/call_credentials.cc
+++ b/src/node/ext/call_credentials.cc
@@ -168,6 +168,7 @@ NAN_METHOD(CallCredentials::CreateFromPlugin) {
uv_async_init(uv_default_loop(),
&state->plugin_async,
SendPluginCallback);
+ uv_unref((uv_handle_t*)&state->plugin_async);
state->plugin_async.data = state;
@@ -271,7 +272,6 @@ void plugin_uv_close_cb(uv_handle_t *handle) {
void plugin_destroy_state(void *ptr) {
plugin_state *state = reinterpret_cast<plugin_state *>(ptr);
- uv_unref((uv_handle_t*)&state->plugin_async);
uv_close((uv_handle_t*)&state->plugin_async, plugin_uv_close_cb);
}