abci/grpc: fix invalid mutex handling in StopForError() (#5849)

Fixes #5840.
This commit is contained in:
Erik Grinaker
2021-01-04 13:56:01 +00:00
committed by GitHub
parent d39eb74daa
commit 1b18d26644
+1 -1
View File
@@ -132,11 +132,11 @@ func (cli *grpcClient) OnStop() {
}
func (cli *grpcClient) StopForError(err error) {
cli.mtx.Lock()
if !cli.IsRunning() {
return
}
cli.mtx.Lock()
if cli.err == nil {
cli.err = err
}