From 9a833a8495e281fa12d2f9be46addd16dfdf2eac Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Fri, 18 Mar 2022 14:35:42 -0400 Subject: [PATCH] consensus: skip channel close during shutdown (#8155) I see this panic in tests occasionally, and I don't think there's any need to close this channel: - it's only sent to in one place which has a select case with a default clause, so there's no chance of deadlocks. - the only place we recieve from it thas a timeout. --- internal/consensus/state.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index 109e90683..d82877ec1 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -511,8 +511,6 @@ func (cs *State) OnStop() { } } - close(cs.onStopCh) - if cs.timeoutTicker.IsRunning() { cs.timeoutTicker.Stop() }