Skip to content

Commit

Permalink
re-introduce @blocklist-wrapper:main.isBlocklistFilterSetup fn
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Jan 24, 2022
1 parent c455420 commit 15f5df6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/workers/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function setup() {
globalThis.envManager = new EnvManager();
}

if (!globalThis.envManager) {
if (!globalThis.log) {
globalThis.log = new Log(
env.logLevel,
isProd // set console level only in prod.
Expand Down
8 changes: 6 additions & 2 deletions src/plugins/blocklist-wrapper/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BlocklistWrapper {
async RethinkModule(param) {
let response = util.emptyResponse();

if (rdnsutil.isBlocklistFilterSetup(this.blocklistFilter)) {
if (this.isBlocklistFilterSetup()) {
response.data.blocklistFilter = this.blocklistFilter;
return response;
}
Expand Down Expand Up @@ -67,7 +67,7 @@ class BlocklistWrapper {
let totalWaitms = 0;
const waitms = 50;
while (totalWaitms < envutil.downloadTimeout()) {
if (rdnsutil.isBlocklistFilterSetup(this.blocklistFilter)) {
if (this.isBlocklistFilterSetup()) {
response.data.blocklistFilter = this.blocklistFilter;
return response;
}
Expand All @@ -87,6 +87,10 @@ class BlocklistWrapper {
return response;
}

isBlocklistFilterSetup() {
return rdnsutil.isBlocklistFilterSetup(this.blocklistFilter);
}

initBlocklistFilterConstruction(td, rd, ft, config) {
this.isBlocklistUnderConstruction = true;
this.startTime = Date.now();
Expand Down

0 comments on commit 15f5df6

Please sign in to comment.