Skip to content

Commit

Permalink
Fix hanging HostsResolver promises
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed May 7, 2020
1 parent 93a2025 commit dad5d73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/hosts-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class HostsResolver {
this._promise = (async () => {
await this._update();

this._promise = null;

if (this._error) {
return;
}
Expand All @@ -59,8 +61,6 @@ class HostsResolver {
this._init();
});
}

this._promise = null;
})();
}

Expand Down

0 comments on commit dad5d73

Please sign in to comment.