Commit 6f6fec5
Tanmay Sharma
fix(realtime): updated the worker clearance in the _startWorkerHeartBeat function
Previously, the worker error handler in _startWorkerHeartbeat() directly calledworkerRef.terminate()
without clearing the workerRef reference. This caused amemory leak on worker errors because on
reconnection, the guard check for workerRef would prevent creating a new worker, leaving the
connection withouta heartbeat mechanism.Now uses the centralized _terminateWorker() method which
both terminates theworker and clears the reference, ensuring proper cleanup and allowing newworkers
to be created on reconnection.This complements the fix in _teardownConnection() to fully prevent
workermemory leaks across all disconnect/error scenarios.1 parent 0949fc0 commit 6f6fec5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
702 | | - | |
| 702 | + | |
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| |||
0 commit comments