Skip to content

Commit

Permalink
Do not poll if disabled during the previous event loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 24, 2019
1 parent df1ae61 commit 7a90f18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src.ts/providers/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ export class BaseProvider extends Provider {

private _doPoll(): void {
this.getBlockNumber().then((blockNumber) => {
if (!this.polling) { return; }

this._setFastBlockNumber(blockNumber);

// If the block hasn't changed, meh.
Expand Down

0 comments on commit 7a90f18

Please sign in to comment.