mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fix: update connection.ts to always clear the heartbeat interval (#1942)
Co-authored-by: Jackson Mills <jmills@ripple.com> Co-authored-by: Elliot Lee <github.public@intelliot.com>
This commit is contained in:
@@ -273,6 +273,7 @@ export class Connection extends EventEmitter {
|
||||
* @returns A promise containing either `undefined` or a disconnected code, that resolves when the connection is destroyed.
|
||||
*/
|
||||
public async disconnect(): Promise<number | undefined> {
|
||||
this.clearHeartbeatInterval()
|
||||
if (this.reconnectTimeoutID !== null) {
|
||||
clearTimeout(this.reconnectTimeoutID)
|
||||
this.reconnectTimeoutID = null
|
||||
|
||||
Reference in New Issue
Block a user