@hiveio/dhive
    Preparing search index...

    Function retryingFetch

    • Smart fetch with immediate failover and per-node health tracking.

      For read operations:

      • On failure, immediately try the next healthy node (no backoff within a round)
      • After trying all nodes once (one round), apply backoff before the next round
      • Stop after failoverThreshold rounds

      For broadcast operations:

      • Only retry on pre-connection errors (ECONNREFUSED, ENOTFOUND, etc.) where we know the request never reached the server
      • NEVER retry after timeout or response errors to prevent double-broadcasting

      Parameters

      • currentAddress: string
      • allAddresses: string | string[]
      • opts: any
      • timeout: number
      • failoverThreshold: number
      • consoleOnFailover: boolean
      • backoff: (tries: number) => number
      • OptionalfetchTimeout: (tries: number) => number
      • OptionalretryContext: RetryContext

      Returns Promise<{ currentAddress: string; response: any }>