POC on how verification function would work. Update function should have something similar.
This commit is contained in:
parent
9999a0834d
commit
34a41e86a8
2 changed files with 22 additions and 3 deletions
7
retry.go
7
retry.go
|
@ -197,9 +197,12 @@ func (r *realisClient) thriftCallWithRetries(
|
|||
// Allow caller to provide a function which checks if the original call was successful before
|
||||
// it timed out.
|
||||
if verifyOnTimeout != nil {
|
||||
resp, ok := verifyOnTimeout()
|
||||
verifyResp, ok := verifyOnTimeout()
|
||||
if ok {
|
||||
return resp, nil
|
||||
r.logger.debugPrint("verified that the call went through successfully")
|
||||
// Response might be different than the original.
|
||||
return verifyResp, nil
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue