mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
abciClient.BeginBlockSync should not hang on crashed server (#1891)
* Add test showing normal Sync call * Show hanging response if server dies during BeginBlock * Flush all in-flight requests on shutdown, not just pending requests * Add bugfix to CHANGELOG
This commit is contained in:
committed by
Anton Kaliaev
parent
b980ef8bea
commit
f9ae7730fe
@ -357,6 +357,13 @@ func (cli *socketClient) queueRequest(req *types.Request) *ReqRes {
|
||||
}
|
||||
|
||||
func (cli *socketClient) flushQueue() {
|
||||
// mark all in-flight messages as resolved (they will get cli.Error())
|
||||
for req := cli.reqSent.Front(); req != nil; req = req.Next() {
|
||||
reqres := req.Value.(*ReqRes)
|
||||
reqres.Done()
|
||||
}
|
||||
|
||||
// mark all queued messages as resolved
|
||||
LOOP:
|
||||
for {
|
||||
select {
|
||||
|
Reference in New Issue
Block a user