-
Notifications
You must be signed in to change notification settings - Fork 535
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
error in DeltaManager.connect() instead of assert #1229
error in DeltaManager.connect() instead of assert #1229
Conversation
@@ -404,6 +404,9 @@ export class Container extends EventEmitterWithErrorHandling implements IContain | |||
} | |||
|
|||
public resume() { | |||
if (this.closed) { | |||
return; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to throw more descriptive error in DeltaManager.connect() and push it to apps to not call resume after then closed container.
Basically no silent failures - it's a bug in their workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1229) Bumps [globals](https://github.com/sindresorhus/globals) from 15.11.0 to 15.12.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v15.11.0...v15.12.0) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Calling
resume()
on a closed container seems to account for a significant proportion of assertion failures reported. If a container is closed whenresume()
is called, it callsconnectToDeltaStream()
which in turn callsdeltaManager.connect()
, causing an immediate assertion failure since the deltaManager is closed when the container is closed.