From 1b18d266446622f561f590e64906387c2252bf39 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Mon, 4 Jan 2021 14:56:01 +0100 Subject: [PATCH] abci/grpc: fix invalid mutex handling in StopForError() (#5849) Fixes #5840. --- abci/client/grpc_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index e7c8491eb..b10eebd9e 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -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 }