@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.
package/lib/index.cjs.js CHANGED
@@ -6939,7 +6939,14 @@ class Connection {
6939
6939
  this._rpcWebSocketIdleTimeout = setTimeout(() => {
6940
6940
  this._rpcWebSocketIdleTimeout = null;
6941
6941
 
6942
- this._rpcWebSocket.close();
6942
+ try {
6943
+ this._rpcWebSocket.close();
6944
+ } catch (err) {
6945
+ // swallow error if socket has already been closed.
6946
+ if (err instanceof Error) {
6947
+ console.log(`Error when closing socket connection: ${err.message}`);
6948
+ }
6949
+ }
6943
6950
  }, 500);
6944
6951
  }
6945
6952