__call(error: Error, attempts: number, totalTime: number): number
The retry strategy to apply.
Returning a number will make the library wait for that amount of milliseconds before trying again.
Returning anything else than a number will make the process stop trying.
By default it will wait up to 30s where each attempt is: #attempt * 1s + 1ms
Parameters
error: Error
why the connection attempt failed
attempts: number
number of connection attempts
totalTime: number
total time elapsed since last time connected or since initialization in the case it's the first connection
The retry strategy to apply. Returning a number will make the library wait for that amount of milliseconds before trying again. Returning anything else than a number will make the process stop trying. By default it will wait up to 30s where each attempt is: #attempt * 1s + 1ms