(err error)
| 465 | } |
| 466 | |
| 467 | func retryable(err error) bool { |
| 468 | return xerrors.Is(err, yamux.ErrSessionShutdown) || xerrors.Is(err, io.EOF) || xerrors.Is(err, fasthttputil.ErrInmemoryListenerClosed) || |
| 469 | // annoyingly, dRPC sometimes returns context.Canceled if the transport was closed, even if the context for |
| 470 | // the RPC *is not canceled*. Retrying is fine if the RPC context is not canceled. |
| 471 | xerrors.Is(err, context.Canceled) |
| 472 | } |
| 473 | |
| 474 | // clientDoWithRetries runs the function f with a client, and retries with |
| 475 | // backoff until either the error returned is not retryable() or the context |
no test coverage detected