@exodus/solana-api 2.3.0 → 2.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "node-fetch": "~2.6.0"
37
37
  },
38
- "gitHead": "fe989a47ba9278f5fe797f9b01d8bc93fb53467a"
38
+ "gitHead": "e18aad06376a9762f1a380ce5d6199d8a43f2599"
39
39
  }
package/src/connection.js CHANGED
@@ -9,8 +9,8 @@ import { WebSocket } from '@exodus/fetch'
9
9
 
10
10
  const SOLANA_DEFAULT_ENDPOINT = 'wss://solana.a.exodus.io/ws'
11
11
  const DEFAULT_RECONNECT_DELAY = ms('15s')
12
- const PING_INTERVAL = ms('50s')
13
- const TIMEOUT = ms('20s')
12
+ const PING_INTERVAL = ms('60s')
13
+ const TIMEOUT = ms('50s')
14
14
 
15
15
  const debug = debugLogger('exodus:solana-api')
16
16
 
@@ -184,8 +184,9 @@ export class Connection {
184
184
  this.rpcQueue[id] = { resolve, reject }
185
185
  this.rpcQueue[id].timeout = setTimeout(() => {
186
186
  delete this.rpcQueue[id]
187
+ debug(`ws timeout command: ${method} - ${JSON.stringify(params)} - ${id}`)
187
188
  reject(new Error('solana ws: reply timeout'))
188
- }, TIMEOUT)
189
+ }, TIMEOUT).unref()
189
190
  this.ws.send(JSON.stringify({ jsonrpc: '2.0', method, params, id }))
190
191
  })
191
192
  }