GeezerVison is showing github.com — Revert "src: fix stuck debugger process" · nodejs/node@d72bb1e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node.cc +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3747,6 +3747,7 @@ void Init(int* argc, |
3747 | 3747 | uv_async_init(uv_default_loop(), |
3748 | 3748 | &dispatch_debug_messages_async, |
3749 | 3749 | DispatchDebugMessagesAsyncCallback); |
| 3750 | + uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async)); |
3750 | 3751 |
|
3751 | 3752 | #if defined(NODE_V8_OPTIONS) |
3752 | 3753 | // Should come before the call to V8::SetFlagsFromCommandLine() |
@@ -4054,11 +4055,8 @@ static void StartNodeInstance(void* arg) { |
4054 | 4055 | env->set_trace_sync_io(trace_sync_io); |
4055 | 4056 |
|
4056 | 4057 | // Enable debugger |
4057 | | - if (instance_data->use_debug_agent()) { |
| 4058 | + if (instance_data->use_debug_agent()) |
4058 | 4059 | EnableDebug(env); |
4059 | | - } else { |
4060 | | - uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async)); |
4061 | | - } |
4062 | 4060 |
|
4063 | 4061 | { |
4064 | 4062 | SealHandleScope seal(isolate); |
|