Verified Commit f59ddd26 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! Bug 40597: Implement TorSettings module

Bug 41114: Refactor TorConnect.

Ignore cancel requests when in non-bootstrapping states.
parent 22b986b8
Loading
Loading
Loading
Loading
+9 −0
Changes for toolkit/modules/TorConnect.sys.mjs: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1174,6 +1174,15 @@ export const TorConnect = {

  cancelBootstrap() {
    lazy.logger.debug("TorConnect.cancelBootstrap()");
    if (
      this.state !== TorConnectState.AutoBootstrapping &&
      this.state !== TorConnectState.Bootstrapping
    ) {
      lazy.logger.warn(
        `Cannot cancel bootstrapping in the ${this.state} state`
      );
      return;
    }
    this._changeState(TorConnectState.Configuring);
  },