Skip to main content
Sign in
Snippets Groups Projects
Verified Commit 34868388 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.

TorConnect does not need to be defined in a function.
parent 1243f925
No related branches found
No related tags found
1 merge request!938Bug 41114: Fix no-async-promise-executor on TorConnect and general refactor
......@@ -862,8 +862,7 @@ class InternetTest {
}
}
export const TorConnect = (() => {
let retval = {
export const TorConnect = {
_state: new InitialState(),
_bootstrapProgress: 0,
_bootstrapStatus: null,
......@@ -1263,10 +1262,7 @@ export const TorConnect = (() => {
await mrpc.init();
this._countryCodes = await mrpc.circumvention_countries();
} catch (err) {
lazy.logger.error(
"An error occurred while fetching country codes",
err
);
lazy.logger.error("An error occurred while fetching country codes", err);
} finally {
mrpc.uninit();
}
......@@ -1325,5 +1321,3 @@ export const TorConnect = (() => {
return uris.map(uri => this.getRedirectURL(uri));
},
};
return retval;
})(); /* TorConnect */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment