mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-05 12:38:09 +03:00
OP-2481 Minor update
This commit is contained in:
@@ -144,6 +144,10 @@ const isSubType = (subType: string): subType is keyof Subscription => Object.val
|
|||||||
class OrionAggregatorWS {
|
class OrionAggregatorWS {
|
||||||
private ws: WebSocket | undefined;
|
private ws: WebSocket | undefined;
|
||||||
|
|
||||||
|
// is used to make sure we do not need to renew ws subscription
|
||||||
|
// we can not be sure that onclose event will recieve our code when we do `ws.close(4000)`
|
||||||
|
// since sometimes it can be replaced with system one.
|
||||||
|
// https://stackoverflow.com/questions/19304157/getting-the-reason-why-websockets-closed-with-close-code-1006
|
||||||
private isClosedIntentionally = false;
|
private isClosedIntentionally = false;
|
||||||
|
|
||||||
private subscriptions: Partial<{
|
private subscriptions: Partial<{
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
|
|||||||
|
|
||||||
readonly type: T;
|
readonly type: T;
|
||||||
|
|
||||||
|
// is used to make sure we do not need to renew ws subscription
|
||||||
|
// we can not be sure that onclose event will recieve our code when we do `ws.close(4000)`
|
||||||
|
// since sometimes it can be replaced with system one.
|
||||||
|
// https://stackoverflow.com/questions/19304157/getting-the-reason-why-websockets-closed-with-close-code-1006
|
||||||
private isClosedIntentionally = false;
|
private isClosedIntentionally = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
Reference in New Issue
Block a user