Skip to content
Snippets Groups Projects
Commit 70a9324d 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.

When simulating censorship, do not trigger an additional change of state
if one is already happening.
parent 60bb10be
Branches
Tags
1 merge request!980Bug 42512: Rebased alpha onto Firefox 115.10.0esr
......@@ -382,6 +382,10 @@ class BootstrappingState extends StateCallback {
}
await debugSleep(1500);
if (this.transitioning) {
// Already left this state.
return true;
}
TorConnect._hasBootstrapEverFailed = true;
if (censorshipLevel === 2) {
const codes = Object.keys(TorConnect._countryNames);
......@@ -453,11 +457,13 @@ class AutoBootstrappingState extends StateCallback {
// location specific settings.
if (censorshipLevel === 3) {
await debugSleep(2500);
if (!this.transitioning) {
this.changeState(
TorConnectState.Error,
"Error: censorship simulation",
""
);
}
return true;
}
......@@ -465,11 +471,13 @@ class AutoBootstrappingState extends StateCallback {
// manually selecting a country.
if (censorshipLevel === 2 && !countryCode) {
await debugSleep(2500);
if (!this.transitioning) {
this.changeState(
TorConnectState.Error,
"Error: Severe Censorship simulation",
""
);
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment