Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle getBlockNumber errors on polling #1235

Closed
wants to merge 1 commit into from
Closed

Handle getBlockNumber errors on polling #1235

wants to merge 1 commit into from

Conversation

andrevmatos
Copy link

@andrevmatos andrevmatos commented Jan 12, 2021

Fixes #1084
Fixes #1208
Fixes #1221

The error was caused by rejections at this.perform("getBlockNumber", { }) in BaseProvider._getInternalBlockNumber causing this._internalBlockNumber to be a rejected promise, then rejecting every later await internalBlockNumber and preventing it from being cleared. The fix is to handle rejections here together with getNetwork changes, clearing the rejected promise variable and passing the error through. This will give the chance for the next poll to do a new request for the blockNumber.

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. labels Jan 13, 2021
@andrevmatos
Copy link
Author

Superseded by the commit. Thanks

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unattended Listener Error Unhandled promise rejections en masse Unhandled Rejections
2 participants