ganache
ganache copied to clipboard
fix: implement backoff retry policy for websocket handler
Web socket handler receives closed connection event more frequently than expected from infura server. So to make ganache more robust a backoff retry mechanism is implemented.
Retry configuration - 3 retries with 2 seconds initial retry and with exponential attempts followed.
When connection is closed, in flight requests are stored temporarily and processed once connection retry attempt succeeds.
Note: Once connection is successful, the retry counter is reset to initial counter.
Would it be possible to get tests added for this change?
Would it be possible to get tests added for this change? Yes. I am going to add few tests to check InFlightRequests too.