mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
OP-2481 Fixup
This commit is contained in:
@@ -262,6 +262,7 @@ class OrionAggregatorWS {
|
||||
}
|
||||
|
||||
init(isReconnect = false) {
|
||||
this.isClosedIntentionally = false;
|
||||
this.ws = new WebSocket(this.wsUrl);
|
||||
this.ws.onclose = () => {
|
||||
if (!this.isClosedIntentionally) this.init(true);
|
||||
|
||||
@@ -93,6 +93,8 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
|
||||
}
|
||||
|
||||
init() {
|
||||
this.isClosedIntentionally = false;
|
||||
|
||||
const { payload, url, type } = this;
|
||||
this.ws = new WebSocket(`${url}/${type}${payload ? `/${payload.toString()}` : ''}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user