Skip to content

Call callback when end called on unconnected client #2109

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

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

brianc
Copy link
Owner

@brianc brianc commented Feb 20, 2020

Closes #2108

Previously the callback would never fire if one didn't first connect the client. This fixes the issue & brings the behavior in line w/ the native client.

@brianc
Copy link
Owner Author

brianc commented Feb 20, 2020

cc @InExtremaRes 😄

@InExtremaRes
Copy link

Thank you, this should work! I will test this ASAP.

However I still wonder if could be a way of knowing if a client is connected. Is there a reason that isn't there?

@brianc
Copy link
Owner Author

brianc commented Feb 20, 2020

However I still wonder if could be a way of knowing if a client is connected. Is there a reason that isn't there?

I just haven't added it "officially" yet. I'll be adding this somewhere after 8.0 ships.

@InExtremaRes
Copy link

I can confirm the change work for me, either with Promise.resolve() as with this._Promise.resolve().

BTW, now that this is a monorepo, is there an easy way of testing a packaged version from a PR or branch? I mean, one can npm install from a commit-ish but ASFAIK that isn't possible for a subfolder. Do you have a way to install and test and individual branch locally without publishing the package? I guess have a local copy of the branch and npm link could work, but I'm asking if you have an "official" o recommended way to do that. Thank you!

use bring your own promise

Co-Authored-By: Charmander <[email protected]>
@brianc brianc merged commit 1c8b6b9 into master Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different behavior calling .end() on a non connected Client between 7.17 and 7.18
3 participants