From d9fb734c8594f619382e736416633ea8f81c62ef Mon Sep 17 00:00:00 2001 From: Alex X Date: Tue, 14 May 2024 19:31:42 +0300 Subject: [PATCH] Fix stop pending producer on multiple mode requests --- internal/streams/stream.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/streams/stream.go b/internal/streams/stream.go index 49c58e77..5dacf991 100644 --- a/internal/streams/stream.go +++ b/internal/streams/stream.go @@ -88,6 +88,11 @@ func (s *Stream) RemoveProducer(prod core.Producer) { } func (s *Stream) stopProducers() { + if s.pending.Load() > 0 { + log.Trace().Msg("[streams] skip stop pending producer") + return + } + s.mu.Lock() producers: for _, producer := range s.producers {