From c2b5f8bc4aa5c8ec53db40febca1b467669ad816 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 0f3aa75a5..b375c6cc9 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -129,11 +129,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 }