Skip to content
Snippets Groups Projects
Verified Commit 6bdd9dcd authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 40597: Implement TorSettings module

Bug 41114: Refactor TorConnect.

Check if the current state is already transitioning, and refusing any
additional transition request.
parent 1343ed70
Branches
Tags
1 merge request!938Bug 41114: Fix no-async-promise-executor on TorConnect and general refactor
......@@ -876,6 +876,12 @@ export const TorConnect = {
},
async _changeState(newState, ...args) {
if (this._stateHandler.transitioning) {
// Avoid an exception to prevent it to be propagated to the original
// begin call.
lazy.logger.warn("Already transitioning");
return;
}
const prevState = this._stateHandler;
// ensure this is a valid state transition
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment