diff --git a/peer.go b/peer.go index 248e5830..60c1c71a 100644 --- a/peer.go +++ b/peer.go @@ -637,6 +637,7 @@ func (ms *msgStream) msgConsumer() { select { case ms.producerSema <- struct{}{}: case <-ms.quit: + atomic.StoreInt32(&ms.streamShutdown, 1) return } }