diff --git a/.github/workflows/ci-lazer-solana-contract.yml b/.github/workflows/ci-lazer-solana-contract.yml index 44b96952b..d464a55db 100644 --- a/.github/workflows/ci-lazer-solana-contract.yml +++ b/.github/workflows/ci-lazer-solana-contract.yml @@ -37,7 +37,7 @@ jobs: - name: Install Anchor run: RUSTFLAGS= cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli - name: Install pnpm - run: npm install --global pnpm@9.13.2 + run: npm install --global pnpm@9.15.4 - name: Install test dependencies run: pnpm install --frozen-lockfile - name: Run tests diff --git a/lazer/sdk/js/package.json b/lazer/sdk/js/package.json index 95e5a906d..4f0707e60 100644 --- a/lazer/sdk/js/package.json +++ b/lazer/sdk/js/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/pyth-lazer-sdk", - "version": "0.3.0", + "version": "0.3.1", "description": "Pyth Lazer SDK", "publishConfig": { "access": "public" diff --git a/lazer/sdk/js/src/socket/websocket-pool.ts b/lazer/sdk/js/src/socket/websocket-pool.ts index 3ee44ba15..c756efc09 100644 --- a/lazer/sdk/js/src/socket/websocket-pool.ts +++ b/lazer/sdk/js/src/socket/websocket-pool.ts @@ -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 = []; @@ -23,7 +24,7 @@ export class WebSocketPool { this.allConnectionsDownListeners = []; // Start monitoring connection states - setInterval(() => { + this.checkConnectionStatesInterval = setInterval(() => { this.checkConnectionStates(); }, 100); } @@ -218,5 +219,6 @@ export class WebSocketPool { this.subscriptions.clear(); this.messageListeners = []; this.allConnectionsDownListeners = []; + clearInterval(this.checkConnectionStatesInterval); } }