Skip to content

Commit

Permalink
feat: skip retry on server side for ErrRetryElsewhere type error
Browse files Browse the repository at this point in the history
  • Loading branch information
JadhavPoonam committed Jan 27, 2023
1 parent 286494a commit bf77e11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/consul/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ CHECK_LEADER:
return true, nil
}
}
// defer to caller to retry
if rpcErr != rate.ErrRetryElsewhere {
return true, rpcErr
}

if retry := canRetry(info, rpcErr, firstCheck, s.config); retry {
// Gate the request until there is a leader
Expand Down

0 comments on commit bf77e11

Please sign in to comment.