Skip to content

fix: await scanner#11242

Merged
patak-cat merged 4 commits intovitejs:mainfrom
sapphi-red:fix/await-scanner
Dec 7, 2022
Merged

fix: await scanner#11242
patak-cat merged 4 commits intovitejs:mainfrom
sapphi-red:fix/await-scanner

Conversation

@sapphi-red
Copy link
Member

Description

When scanner didn't finish before server is closed, esbuild hanged up, I guess.

  1. scanner starts
  2. server close
  3. scanner ends

refs #11239

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@@ -202,7 +208,9 @@ async function createDepsOptimizer(
try {
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should wrap this callback and await that instead of just awaiting this part?

Copy link
Member

Choose a reason for hiding this comment

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

I think the whole promise handling here is due a refactoring. Lets merge this this change that works so we can release a patch

@patak-cat
Copy link
Member

Great finding!

@patak-cat patak-cat merged commit 52a6732 into vitejs:main Dec 7, 2022
@sapphi-red sapphi-red deleted the fix/await-scanner branch December 8, 2022 04:17
futurGH pushed a commit to futurGH/vite that referenced this pull request Feb 26, 2023
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.

2 participants