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

Add provider existence check to WebsocketProvider close emitter logic #3489

Merged
merged 1 commit into from
Apr 27, 2020

Conversation

cgewecke
Copy link
Collaborator

@cgewecke cgewecke commented Apr 27, 2020

Description

In #3487, the ganache_e2e test is crashing unexpectedly because the changes in #3486 (incorrectly) assume that a provider is set while running the close event handler.

In practice, the handler's execution priority isn't guaranteed and the provider may no longer be around by the time this logic is run.

Fixes #3487 (see #3488)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.

@cgewecke cgewecke added 1.x 1.0 related issues Bug Addressing a bug labels Apr 27, 2020
Copy link
Collaborator

@ryanio ryanio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ryanio ryanio merged commit 682bb84 into 1.x Apr 27, 2020
@cgewecke
Copy link
Collaborator Author

@ryanio Thanks!

@cgewecke cgewecke deleted the issue/3485-redux branch April 27, 2020 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants