ABCI: Fix ReCheckTx for Socket Client (#6124)

Fixes the race condition between a callback being set and called during ReCheckTx. Note, I do not see equivalent logic in the gRPC client (anymore) as #5439 suggests, so only the socket client was updated.

closes: #5439
This commit is contained in:
Aleksandr Bezobchuk
2021-02-17 17:03:11 +00:00
committed by GitHub
parent b6be889b97
commit 5b52f87789
3 changed files with 38 additions and 27 deletions
+1 -3
View File
@@ -226,9 +226,7 @@ func (cli *socketClient) didRecvResponse(res *types.Response) error {
//
// NOTE: It is possible this callback isn't set on the reqres object. At this
// point, in which case it will be called after, when it is set.
if cb := reqres.GetCallback(); cb != nil {
cb(res)
}
reqres.InvokeCallback()
return nil
}