Verified Commit 6bdd9dcd authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
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
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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