XRPL-Labs / xrpl-client

Connect to the XRP Ledger using WebSockets
https://www.npmjs.com/package/xrpl-client
MIT License
12 stars 8 forks source link

The client will give up after one try when using tryAllNodes #9

Closed ckniffen closed 1 year ago

ckniffen commented 1 year ago

If all endpoints fail to get a connection when using tryAllNodes it will not try a second time. This occasionally happens in the Explorer when a cluster is under high congestion.

Steps to Reproduce

  1. Call new new
    XrplClient(['wss://google.com', 'wss://yahoo.com'], {
    tryAllNodes: true
    })
  2. Look at browser network tab you will see it gives up trying to make a connection. Once per endpoint.
  3. Set tryAllNodes to false
  4. Look at browser network tab you will see it will keep trying to connect.
WietseWind commented 1 year ago

That's currently as designed (try all, or fail) but it's not too hard to add retrying anyway. Will work on that.

WietseWind commented 1 year ago

Added in xrpl-client@2.0.2, published.

https://github.com/XRPL-Labs/xrpl-client/commit/ec887f472845869839d62222529fdbd84b7984b8

ckniffen commented 1 year ago

Fantastic!