Skip to content
Snippets Groups Projects
Commit a1c7bc19 authored by Loïc Correnson's avatar Loïc Correnson Committed by David Bühler
Browse files

[ivette] only stop polling when no pending rqs

parent 504ca843
No related branches found
No related tags found
No related merge requests found
...@@ -786,7 +786,7 @@ function _resolved(id: string): void { ...@@ -786,7 +786,7 @@ function _resolved(id: string): void {
client.onConnect((err?: Error) => { client.onConnect((err?: Error) => {
if (err) { if (err) {
_status(Status.FAILURE); _status(Status.FAILURE);
_stopPolling(); _clear();
} else { } else {
_status(Status.CMD); _status(Status.CMD);
_startPolling(); _startPolling();
...@@ -833,8 +833,10 @@ client.onCmdLine((cmd: boolean) => { ...@@ -833,8 +833,10 @@ client.onCmdLine((cmd: boolean) => {
_status(cmd ? Status.CMD : Status.ON); _status(cmd ? Status.CMD : Status.ON);
if (cmd) if (cmd)
_startPolling(); _startPolling();
else else {
_stopPolling(); if (pending.size === 0)
_stopPolling();
}
}); });
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment