diff options
author | murgatroid99 <mlumish@google.com> | 2016-03-17 11:49:24 -0700 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2016-03-17 11:49:24 -0700 |
commit | 4718a387fd5716b606ad667be884ec798b83a9c5 (patch) | |
tree | bea19f5316750d2f53aaa502b812b144d92bd5bb /src/node/ext | |
parent | 25269f07c9845253b38595066aabab1ec56aa2b3 (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.cc | 2 |
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); } |