From 1f6f12301223e656cc21663a441e95e8844e7542 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 29 Oct 2015 13:33:03 +0100 Subject: [PATCH] Revert "src: fix stuck debugger process" This reverts commit ff877e93e16971ab8514772bd8d112e240b74803. Reverted for breaking `node --debug-brk -e 0`. It should immediately quit but instead it hangs now. PR-URL: https://github.com/nodejs/node/pull/3585 Reviewed-By: Evan Lucas Reviewed-By: James M Snell --- src/node.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node.cc b/src/node.cc index 46fca923ac57e8..18b92d382522fc 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3726,6 +3726,7 @@ void Init(int* argc, uv_async_init(uv_default_loop(), &dispatch_debug_messages_async, DispatchDebugMessagesAsyncCallback); + uv_unref(reinterpret_cast(&dispatch_debug_messages_async)); #if defined(NODE_V8_OPTIONS) // Should come before the call to V8::SetFlagsFromCommandLine() @@ -4033,11 +4034,8 @@ static void StartNodeInstance(void* arg) { env->set_trace_sync_io(trace_sync_io); // Enable debugger - if (instance_data->use_debug_agent()) { + if (instance_data->use_debug_agent()) EnableDebug(env); - } else { - uv_unref(reinterpret_cast(&dispatch_debug_messages_async)); - } { SealHandleScope seal(isolate);