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: shutdown process after closing server #4082

Merged
merged 2 commits into from Jul 12, 2021

Conversation

IanVS
Copy link
Contributor

@IanVS IanVS commented Jul 2, 2021

Description

Fixes #4079

I tried adding process.stdin.resume() in #3659 because that is what CRA does in order to allow the stream to drain correctly. I don't have a great understanding of node processes though, and perhaps this was not correct for the vite use case.

This also fixes the logic to turn off the listener, which was missed in the previous PR.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@patak-dev
Copy link
Member

@schalk-b would you check that your use case is covered by this PR?

@schalk-b
Copy link

schalk-b commented Jul 2, 2021

Yes, I can confirm this resolves my issue, thank you

@patak-dev patak-dev mentioned this pull request Jul 6, 2021
6 tasks
@patak-dev patak-dev linked an issue Jul 6, 2021 that may be closed by this pull request
6 tasks
@Shinigami92
Copy link
Member

@patak-js Sorry but I don't have the knowledge to review this one, otherwise I already had done 😉
Please nominate another team member or optionally trust @schalk-b

@antfu antfu merged commit eac779c into vitejs:main Jul 12, 2021
@IanVS IanVS deleted the 4079-shutdown-process branch July 12, 2021 12:34
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Nov 8, 2021
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
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.

Vite 2.4.0 Broke my setup Vite does not shutdown properly when calling close() on the ViteDevServer
5 participants