mirror of https://github.com/status-im/consul.git
Handle ErrChunkingResubmit.Error properly
Previously canRetry was attempting to retrieve this error from args, however there was never any callers that would pass an error to args. With the change to raftApply to move this error to the error return value, it is now possible to receive this error from the err argument. This commit updates canRetry to check for ErrChunkingResubmit in err.
This commit is contained in:
parent
d2ab767fef
commit
87cd3fc2e8
|
@ -535,9 +535,8 @@ func canRetry(args interface{}, err error) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// If we are chunking and it doesn't seem to have completed, try again
|
||||
intErr, ok := args.(error)
|
||||
if ok && strings.Contains(intErr.Error(), ErrChunkingResubmit.Error()) {
|
||||
// If we are chunking and it doesn't seem to have completed, try again.
|
||||
if err != nil && strings.Contains(err.Error(), ErrChunkingResubmit.Error()) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue