From 49144ab64d3c5810f70585c2ccb0c90539fec116 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Thu, 18 Jul 2019 13:04:11 -0700 Subject: [PATCH] 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 d9cef5e56664a8..a1cdc606fe8e62 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;