Browse Source

hls: pring exact reason why a muxer is closed

pull/764/head
aler9 5 years ago
parent
commit
92163a2b0e
  1. 4
      internal/core/hls_muxer.go

4
internal/core/hls_muxer.go

@ -398,7 +398,7 @@ func (m *hlsMuxer) runInner(innerCtx context.Context, innerReady chan struct{}) @@ -398,7 +398,7 @@ func (m *hlsMuxer) runInner(innerCtx context.Context, innerReady chan struct{})
if !m.hlsAlwaysRemux && time.Since(t) >= closeAfterInactivity {
m.ringBuffer.Close()
<-writerDone
return nil
return fmt.Errorf("not used anymore")
}
case err := <-writerDone:
@ -407,7 +407,7 @@ func (m *hlsMuxer) runInner(innerCtx context.Context, innerReady chan struct{}) @@ -407,7 +407,7 @@ func (m *hlsMuxer) runInner(innerCtx context.Context, innerReady chan struct{})
case <-innerCtx.Done():
m.ringBuffer.Close()
<-writerDone
return nil
return fmt.Errorf("terminated")
}
}
}

Loading…
Cancel
Save