POC on how verification function would work. Update function should have something similar.

This commit is contained in:
Renán Del Valle 2021-04-29 20:08:19 -07:00
parent 9999a0834d
commit 34a41e86a8
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
2 changed files with 22 additions and 3 deletions

View file

@ -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
}
}
}