Closed mrbbot closed 1 year ago
Latest commit: 901671afd837db5fdc434b7232770bbd36affd71
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/cloudflare/miniflare/new/bcoll/fix-tre-sync-dispose?filename=.changeset/mighty-kangaroos-reply.md&value=---%0A%22%40fake-scope%2Ffake-pkg%22%3A%20patch%0A---%0A%0A%5BMiniflare%203%5D%20Fix%20%60Miniflare%23dispose()%60%20immediately%20after%20%60new%20Miniflare()%60%0A)
We previously waited for Miniflare to be ready before
dispose()
ing. Unfortunately, we weren't waiting for theworkerd
config to finish being written to stdin. Callingdispose()
immediately afternew Miniflare()
would stop waiting for socket ports to be reported, and kill theworkerd
process while data was still being written. This threw an unhandledEPIPE
error.This changes makes sure we don't report that Miniflare is ready until after the config is fully-written.
Closes cloudflare/workers-sdk#4363