mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-05 16:46:58 +08:00
chore: add more log
This commit is contained in:
@@ -356,9 +356,18 @@ func (r *Stream) action(action StreamAction) (ok bool) {
|
||||
r.Subscribers.Dispose()
|
||||
r.actionChan.Close()
|
||||
}
|
||||
if actionCoust := time.Since(event.Time); actionCoust > 100*time.Millisecond {
|
||||
r.Warn("action timeout", zap.String("action", action.String()), zap.Duration("cost", actionCoust))
|
||||
}
|
||||
EventBus <- stateEvent
|
||||
if actionCoust := time.Since(event.Time); actionCoust > 100*time.Millisecond {
|
||||
r.Warn("action timeout after eventbus", zap.String("action", action.String()), zap.Duration("cost", actionCoust))
|
||||
}
|
||||
if r.Publisher != nil {
|
||||
r.Publisher.OnEvent(stateEvent)
|
||||
if actionCoust := time.Since(event.Time); actionCoust > 100*time.Millisecond {
|
||||
r.Warn("action timeout after send to publisher", zap.String("action", action.String()), zap.Duration("cost", actionCoust))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r.Debug("wrong action", zap.String("action", action.String()))
|
||||
|
@@ -126,7 +126,7 @@ func (s *Subscribers) Find(id string) ISubscriber {
|
||||
func (s *Subscribers) Delete(suber ISubscriber) {
|
||||
io := suber.GetSubscriber()
|
||||
for _, reader := range io.readers {
|
||||
reader.Track.ReaderCount.Add(-1)
|
||||
reader.Track.Debug("reader -1", zap.Int32("count", reader.Track.ReaderCount.Add(-1)))
|
||||
}
|
||||
if _, ok := s.public[suber]; ok {
|
||||
delete(s.public, suber)
|
||||
|
@@ -44,7 +44,7 @@ func (r *AVRingReader) DecConfChanged() bool {
|
||||
}
|
||||
|
||||
func NewAVRingReader(t *Media) *AVRingReader {
|
||||
t.ReaderCount.Add(1)
|
||||
t.Debug("reader +1", zap.Int32("count", t.ReaderCount.Add(1)))
|
||||
return &AVRingReader{
|
||||
Track: t,
|
||||
}
|
||||
|
Reference in New Issue
Block a user