diff --git a/cmd/streams/stream.go b/cmd/streams/stream.go index 8079edf4..0a675b1f 100644 --- a/cmd/streams/stream.go +++ b/cmd/streams/stream.go @@ -102,9 +102,10 @@ func (s *Stream) AddConsumer(cons streamer.Consumer) (err error) { } s.wg.Done() - s.wg.Wait() if len(producers) == 0 { + s.wg.Wait() + s.stopProducers() if len(codecs) > 0 {