Closed erikian closed 1 year ago
If the destroy method is called on a client, it keeps trying to send a heartbeat after heartbeatIntervalMs, resulting in a TypeError: Cannot read properties of null (reading 'write') here:
destroy
heartbeatIntervalMs
TypeError: Cannot read properties of null (reading 'write')
https://github.com/Eneris/push-receiver/blob/a71ceaee715d162096bc478b8d680e44b12e966c/src/client.ts#L246-L249
This fix calls the clearHeartbeat method on destroy to prevent this error.
clearHeartbeat
If the
destroy
method is called on a client, it keeps trying to send a heartbeat afterheartbeatIntervalMs
, resulting in aTypeError: Cannot read properties of null (reading 'write')
here:https://github.com/Eneris/push-receiver/blob/a71ceaee715d162096bc478b8d680e44b12e966c/src/client.ts#L246-L249
This fix calls the
clearHeartbeat
method on destroy to prevent this error.