-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(cli): old setInterval remains and is not cleared in garbage collection #32985
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
Changes from 5 commits
2a31e2b
19ae427
f7726d9
fa26047
d0d410f
279f5a9
70c7b85
06322de
e2ae3ba
9a7daea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -41,6 +41,13 @@ export class ProgressPrinter { | |||||
| } | ||||||
|
|
||||||
| public start() { | ||||||
| // If there is already a running setInterval, throw an error. | ||||||
| // This is because if this.setInterval is reassigned to another setInterval, | ||||||
| // the original setInterval remains and can no longer be cleared. | ||||||
| if (this.setInterval) { | ||||||
| throw new Error('ProgressPrinter is already running. Stop it first using the stop() method before starting it again.'); | ||||||
|
||||||
| throw new Error('ProgressPrinter is already running. Stop it first using the stop() method before starting it again.'); | |
| throw new ToolkitError('ProgressPrinter is already running. Stop it first using the stop() method before starting it again.'); |
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.
import { ToolkitError } from '../../toolkit/error';
^ needs to be added at the top of this file @sakurai-ryo. I don't have push access to your fork.
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.
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.
This seems like the actual fix!