From 895aad88dc0a8a78ce1e60ee28f26b3d74701d26 Mon Sep 17 00:00:00 2001 From: olzzon Date: Wed, 27 Nov 2024 09:02:58 +0100 Subject: [PATCH] fix: remove .on() in discard() - typo --- src/Ember/Client/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Ember/Client/index.ts b/src/Ember/Client/index.ts index 4e7eb71..87ef528 100644 --- a/src/Ember/Client/index.ts +++ b/src/Ember/Client/index.ts @@ -170,10 +170,9 @@ export class EmberClient extends EventEmitter { this._client.removeAllListeners() // @ts-expect-error: after using this method, properties are no longer expected to always exist delete this._client - this._client.on('disconnected', () => { - this._requests.clear() // Just clean up the requests - this.emit('disconnected') // Notify listeners about the disconnection - }) + this._requests.clear() // Just clean up the requests + this.emit('disconnected') // Notify listeners about the disconnection + clearInterval(this._timer) }