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:
parent
6c288a7044
commit
49144ab64d
@ -699,8 +699,7 @@ class NodeInspectorClient : public V8InspectorClient {
|
|||||||
|
|
||||||
MultiIsolatePlatform* platform = env_->isolate_data()->platform();
|
MultiIsolatePlatform* platform = env_->isolate_data()->platform();
|
||||||
while (shouldRunMessageLoop()) {
|
while (shouldRunMessageLoop()) {
|
||||||
if (interface_ && hasConnectedSessions())
|
if (interface_) interface_->WaitForFrontendEvent();
|
||||||
interface_->WaitForFrontendEvent();
|
|
||||||
while (platform->FlushForegroundTasks(env_->isolate())) {}
|
while (platform->FlushForegroundTasks(env_->isolate())) {}
|
||||||
}
|
}
|
||||||
running_nested_loop_ = false;
|
running_nested_loop_ = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user