Fix cleanup
@@ -31,13 +31,8 @@ func Init(dcID, nodeID, rpcID, eventID, natsURL string) {
func checkRTC() {
log.Infof("SFU.checkRTC start")
go func() {
- for mInfo := range rtc.CleanChannel {
- mediaInfo, err := proto.ParseMediaInfo(mInfo)
- if err != nil {
- log.Errorf("Error parsing media info %v", mInfo)
- continue
- }
- broadcaster.Say(proto.SFUStreamRemove, util.Map("mid", mediaInfo.MID))
+ for mid := range rtc.CleanChannel {
+ broadcaster.Say(proto.SFUStreamRemove, util.Map("mid", mid))
}
}()
}
