Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lazer/sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-lazer-sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "Pyth Lazer SDK",
"publishConfig": {
"access": "public"
Expand Down
4 changes: 3 additions & 1 deletion lazer/sdk/js/src/socket/websocket-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class WebSocketPool {
private messageListeners: ((event: WebSocket.Data) => void)[];
private allConnectionsDownListeners: (() => void)[];
private wasAllDown = true;
private checkConnectionStatesInterval: NodeJS.Timeout;

private constructor(private readonly logger: Logger = dummyLogger) {
this.rwsPool = [];
Expand All @@ -23,7 +24,7 @@ export class WebSocketPool {
this.allConnectionsDownListeners = [];

// Start monitoring connection states
setInterval(() => {
this.checkConnectionStatesInterval = setInterval(() => {
this.checkConnectionStates();
}, 100);
}
Expand Down Expand Up @@ -218,5 +219,6 @@ export class WebSocketPool {
this.subscriptions.clear();
this.messageListeners = [];
this.allConnectionsDownListeners = [];
clearInterval(this.checkConnectionStatesInterval);
}
}
Loading