Skip to content

Commit 91bd4d6

Browse files
committed
Do not check if container running when stopping log producer
1 parent 872fd75 commit 91bd4d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/logstream/logstream.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,12 @@ func (m *LogStream) DisconnectContainer(container LogProducingContainer) error {
478478
m.log.Info().Str("Container", container.GetContainerID()).Msg("Disconnecting container")
479479

480480
if container.IsRunning() {
481-
m.log.Info().Str("Container", container.GetContainerID()).Msg("Stopping log producer")
482-
err = container.StopLogProducer()
481+
m.log.Info().Str("Container", container.GetContainerID()).Msg("Container is running")
483482
}
484483

484+
m.log.Info().Str("Container", container.GetContainerID()).Msg("Stopping log producer")
485+
err = container.StopLogProducer()
486+
485487
consumerFound := false
486488
m.consumerMutex.RLock()
487489
for _, consumer := range m.consumers {

0 commit comments

Comments
 (0)