mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
capture stream remove listeners on shutdown.
This commit is contained in:
parent
2204400282
commit
8f9ad2cd9b
@ -64,6 +64,12 @@ func streamNew(codec codec.RTPCodec, pipelineStr func() string) *StreamManagerCt
|
||||
func (manager *StreamManagerCtx) shutdown() {
|
||||
manager.logger.Info().Msgf("shutting down")
|
||||
|
||||
manager.emitMu.Lock()
|
||||
for key := range manager.listeners {
|
||||
delete(manager.listeners, key)
|
||||
}
|
||||
manager.emitMu.Unlock()
|
||||
|
||||
manager.destroyPipeline()
|
||||
manager.emitStop <- true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user