There are several steps that the Worker instance has to go through before the child process is fully established: waiting for the 'listening' event; waiting for the 'connection' event, etc.
Make sure that we properly clean up state no matter where we are in the lifetime of the child process.
There are several steps that the Worker instance has to go through before the child process is fully established: waiting for the 'listening' event; waiting for the 'connection' event, etc.
Make sure that we properly clean up state no matter where we are in the lifetime of the child process.