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 <info@bnoordhuis.nl>
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Eugene Ostroukhov 2019-07-18 13:04:11 -07:00 committed by Rich Trott
parent 6c288a7044
commit 49144ab64d

View File

@ -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;