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

fix(watch): respawn process only after exit #244

Closed

Conversation

npdev453
Copy link

That code cause EADDRINUSE error in 50% of restarts in watch command if port binding going fast.
Aslo impossible to get around it with graceful shutdown logic.

&& (!runProcess.killed && runProcess.exitCode === null)
) {
runProcess.kill();
}
Copy link
Owner

Choose a reason for hiding this comment

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

Can you move this logic down right after the exit handler is registered?

Copy link
Author

@npdev453 npdev453 May 19, 2023

Choose a reason for hiding this comment

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

@privatenumber like that?

Copy link

Choose a reason for hiding this comment

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

@privatenumber, could you take a look? Fixing this problem would improve developer experience quite a lot

Copy link

Choose a reason for hiding this comment

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

it is a very useful feature, PTAL @privatenumber

@npdev453 npdev453 changed the title fix(watch): respawn process after exit fix(watch): respawn process only after exit May 29, 2023
@privatenumber privatenumber mentioned this pull request Jul 15, 2023
21 tasks
@privatenumber
Copy link
Owner

Maintainer editing is disabled on this pull request, so I can't make changes or run tests.

Closing in favor of #298

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants