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

fixup! Bug 40597: Implement TorSettings module

Bug 41801: Fix handleProcessReady in TorSettings.init
parent 282e5c98
Branches
Tags
1 merge request!655Bug 41801: Fix handleProcessReady in TorSettings.init
......@@ -299,7 +299,7 @@ const TorSettings = (() => {
Services.obs.addObserver(this, TorTopics.ProcessIsReady);
if (TorMonitorService.isRunning) {
handleProcessReady();
this.handleProcessReady();
}
}
},
......@@ -308,22 +308,22 @@ const TorSettings = (() => {
async observe(subject, topic, data) {
console.log(`TorSettings: Observed ${topic}`);
// once the tor daemon is ready, we need to apply our settings
const handleProcessReady = async () => {
// push down settings to tor
await this.applySettings();
console.log("TorSettings: Ready");
Services.obs.notifyObservers(null, TorSettingsTopics.Ready);
};
switch (topic) {
case TorTopics.ProcessIsReady:
Services.obs.removeObserver(this, TorTopics.ProcessIsReady);
await handleProcessReady();
await this.handleProcessReady();
break;
}
},
// once the tor daemon is ready, we need to apply our settings
async handleProcessReady() {
// push down settings to tor
await this.applySettings();
console.log("TorSettings: Ready");
Services.obs.notifyObservers(null, TorSettingsTopics.Ready);
},
// load our settings from prefs
loadFromPrefs() {
console.log("TorSettings: loadFromPrefs()");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment