-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(process): rename heartbeat to ping and clear timeout on response
This commit addresses two issues in the worker communication system. First, it renames the 'heartbeat' message to 'ping' for clarity and consistency across the codebase. This change affects the `workerRegister.ts`, `workerRegister.test.ts`, and `workerRequest.ts` files. Secondly, it fixes a potential issue with dangling timeouts in the `workerRequest` function. The timeout is now cleared not only when receiving a ping but also after resolving or rejecting the promise. This ensures that the timeout is properly cleaned up in all scenarios, preventing potential memory leaks or unexpected behavior.
- Loading branch information
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters