commandLineUtil: toggle _updated after the callback returns

The callback can be used to process the received data a single time, and
in that case this._updated should only be toggled after the callback has
completed, since other methods may depend on its side effects.

In other scenarios the order does not matter (either way).
This commit is contained in:
Jonas Malaco
2021-04-28 05:05:44 -03:00
parent 0fe773b35a
commit cb33301cc7

View File

@@ -26,8 +26,8 @@ var CommandLineUtil = class {
} catch (e) {
logError(e);
} finally {
this._updated = true;
callback();
this._updated = true;
}
});
} catch(e){