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

WIP: Fix Error using ctrl-c in dev mode #727

Closed
wants to merge 1 commit into from

Conversation

JacobMGEvans
Copy link
Contributor

@JacobMGEvans JacobMGEvans commented Mar 29, 2022

The proxyServer was conducting async behavior in useEffect without cleaning up, the SIGINT didn't allow for graceful shutdown for subsequent startups of proxyServer.

resolve #375

@changeset-bot
Copy link

changeset-bot bot commented Mar 29, 2022

🦋 Changeset detected

Latest commit: 4b94bf5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2060692348/npm-package-wrangler-727

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/727/npm-package-wrangler-727

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2060692348/npm-package-wrangler-727 dev path/to/script.js

…t cleaning up the SIGINT didnt allow for graceful shutdown for subsequent startups of proxyServer
@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/control+c-error-dev branch from 01974b0 to 4b94bf5 Compare March 29, 2022 19:28
@JacobMGEvans JacobMGEvans marked this pull request as draft March 29, 2022 22:33
@JacobMGEvans JacobMGEvans changed the title Fix Error using ctrl-c in dev mode WIP: Fix Error using ctrl-c in dev mode Mar 29, 2022
@threepointone
Copy link
Contributor

Good catch! I tested this and couldn't reproduce the error anymore.

There's a separate issue where we need to hit ctrl-c twice to actually quit the process, but we should file a different issue and track that separately.

Happy to stamp this PR if you open it for review.

@JacobMGEvans
Copy link
Contributor Author

Good catch! I tested this and couldn't reproduce the error anymore.

There's a separate issue where we need to hit ctrl-c twice to actually quit the process, but we should file a different issue and track that separately.

Happy to stamp this PR if you open it for review.

Thanks! Pete found a deeper cause which solves this and the needing to hit ctrl-c twice. Additionally clearing the waitForPortToBeAvailable which was slowing down the shutdown.

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.

Error when running ctrl-c in dev mode
2 participants