-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat: prevent double start #580
Conversation
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.
LGTM
@@ -245,6 +247,8 @@ export class Unleash extends EventEmitter { | |||
} | |||
|
|||
async start(): Promise<void> { | |||
if(this.started) return; | |||
this.started = true; |
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.
Oh, so this was the error. Ok, this is a great improvement.
Did you also check the destroy() method?
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.
Do we want to start the client again after destroy? If not then destroy changes are not needed
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [unleash-client](https://togithub.com/Unleash/unleash-client-node) | [`5.5.0-beta.1` -> `5.5.0`](https://renovatebot.com/diffs/npm/unleash-client/5.5.0-beta.1/5.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Unleash/unleash-client-node (unleash-client)</summary> ### [`v5.5.0`](https://togithub.com/Unleash/unleash-client-node/releases/tag/v5.5.0) [Compare Source](https://togithub.com/Unleash/unleash-client-node/compare/v5.5.0-beta.1...v5.5.0) #### What's Changed - feat: prevent double start by [@​kwasniew](https://togithub.com/kwasniew) in [https://github.com/Unleash/unleash-client-node/pull/580](https://togithub.com/Unleash/unleash-client-node/pull/580) - chore: upgrade make-fetch-happen by [@​kwasniew](https://togithub.com/kwasniew) in [https://github.com/Unleash/unleash-client-node/pull/583](https://togithub.com/Unleash/unleash-client-node/pull/583) **Full Changelog**: Unleash/unleash-client-node@v5.4.0...v5.5.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am every weekday" in timezone Europe/Madrid, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/Unleash/unleash). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
About the changes
Prevent unleash client from starting twice. It will prevent bugs that were previously fixed in the user space: Unleash/unleash#6141
Details:
Important files
Discussion points