From 7b0b06d735c90c41900efe5948a0aee6c0a745df Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Thu, 18 Jul 2019 13:04:11 -0700 Subject: inspector: do not spin-wait while waiting for the initial connection Fixes: https://github.com/nodejs/node/issues/28741 PR-URL: https://github.com/nodejs/node/pull/28756 Reviewed-By: Ben Noordhuis Reviewed-By: Aleksei Koziatinskii Reviewed-By: Colin Ihrig Reviewed-By: Anto Aravinth Reviewed-By: Trivikram Kamat Reviewed-By: Anna Henningsen --- src/inspector_agent.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 4a4a8eb4be..e392be8595 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -699,8 +699,7 @@ class NodeInspectorClient : public V8InspectorClient { MultiIsolatePlatform* platform = env_->isolate_data()->platform(); while (shouldRunMessageLoop()) { - if (interface_ && hasConnectedSessions()) - interface_->WaitForFrontendEvent(); + if (interface_) interface_->WaitForFrontendEvent(); while (platform->FlushForegroundTasks(env_->isolate())) {} } running_nested_loop_ = false; -- cgit v1.2.3