next.js
d735d317 - fix static worker restart behavior (#56728)

Commit
2 years ago
fix static worker restart behavior (#56728) In [55841](https://github.com/vercel/next.js/pull/55841), this file was reworked to improve type safety and readability, but it changed the behavior of how we were invoking methods on the worker. Specifically, when a restart occurred, this timeout wrapping function was referencing an already ended worker, resulting in a "Farm is ended, no more calls can be done to it" build error. This PR ensures that we're fetching the method from the current `this._worker` at the time of invocation, not at the time of method creation. [Slack x-ref](https://vercel.slack.com/archives/C04KC8A53T7/p1697064752635179?thread_ts=1696952142.759769&cid=C04KC8A53T7)
Author
Parents
Loading