Avoid peer notification when peer is offline, tune retries (#16737)

This commit is contained in:
Poorna
2023-03-07 08:13:28 -08:00
committed by GitHub
parent 901887e6bf
commit a6057c35cc
2 changed files with 29 additions and 16 deletions
+4
View File
@@ -57,6 +57,10 @@ func (client *peerRESTClient) call(method string, values url.Values, body io.Rea
// permanently. The only way to restore the connection is at the xl-sets layer by xlsets.monitorAndConnectEndpoints()
// after verifying format.json
func (client *peerRESTClient) callWithContext(ctx context.Context, method string, values url.Values, body io.Reader, length int64) (respBody io.ReadCloser, err error) {
if client == nil || !client.IsOnline() {
return nil, errPeerNotReachable
}
if values == nil {
values = make(url.Values)
}