@solana/web3.js 1.32.1 → 1.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7403,7 +7403,14 @@ class Connection {
7403
7403
  this._rpcWebSocketIdleTimeout = setTimeout(() => {
7404
7404
  this._rpcWebSocketIdleTimeout = null;
7405
7405
 
7406
- this._rpcWebSocket.close();
7406
+ try {
7407
+ this._rpcWebSocket.close();
7408
+ } catch (err) {
7409
+ // swallow error if socket has already been closed.
7410
+ if (err instanceof Error) {
7411
+ console.log(`Error when closing socket connection: ${err.message}`);
7412
+ }
7413
+ }
7407
7414
  }, 500);
7408
7415
  }
7409
7416