mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 14:12:35 +03:00
🔧 #16
This commit is contained in:
@@ -107,6 +107,7 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
|
||||
};
|
||||
|
||||
this.ws.onclose = (e) => {
|
||||
if (this.heartbeatInterval) clearInterval(this.heartbeatInterval);
|
||||
if (e.code !== 4000) this.init();
|
||||
};
|
||||
|
||||
@@ -116,7 +117,6 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
|
||||
}
|
||||
|
||||
kill() {
|
||||
if (this.heartbeatInterval) clearInterval(this.heartbeatInterval);
|
||||
this.ws?.close(4000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user