mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
auth/rpc: Make auth rpc client retry configurable. (#3695)
Currently the auth rpc client defaults to to a maximum cap of 30seconds timeout. Make this to be configurable by the caller of authRPCClient during initialization, if no such config is provided then default to 30 seconds.
This commit is contained in:
@@ -220,9 +220,12 @@ func (f retryStorage) reInit() (err error) {
|
||||
// Close the underlying connection.
|
||||
f.remoteStorage.Close() // Error here is purposefully ignored.
|
||||
|
||||
// Done channel is used to close any lingering retry routine, as soon
|
||||
// as this function returns.
|
||||
doneCh := make(chan struct{})
|
||||
defer close(doneCh)
|
||||
for i := range newRetryTimer(f.retryUnit, f.retryCap, MaxJitter, doneCh) {
|
||||
|
||||
for i := range newRetryTimer(f.retryUnit, f.retryCap, doneCh) {
|
||||
// Initialize and make a new login attempt.
|
||||
err = f.remoteStorage.Init()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user