Skip to content

Commit

Permalink
Merge pull request #179 from pion/sfu_keys
Browse files Browse the repository at this point in the history
Fix bad SFU mid key

Former-commit-id: fe778dc
  • Loading branch information
jbrady42 authored May 14, 2020
2 parents 710bcbe + ff9d6c7 commit 7c3003a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/sfu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ func main() {

rpcID := serviceNode.GetRPCChannel()
eventID := serviceNode.GetEventChannel()
sfu.Init(conf.Global.Dc, serviceNode.NodeInfo().ID, rpcID, eventID, conf.Nats.URL)
sfu.Init(conf.Global.Dc, serviceNode.NodeInfo().Info["id"], rpcID, eventID, conf.Nats.URL)
select {}
}
9 changes: 7 additions & 2 deletions pkg/node/sfu/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ func Init(dcID, nodeID, rpcID, eventID, natsURL string) {
func checkRTC() {
log.Infof("SFU.checkRTC start")
go func() {
for mid := range rtc.CleanChannel {
broadcaster.Say(proto.SFUStreamRemove, util.Map("mid", mid))
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))
}
}()
}

0 comments on commit 7c3003a

Please sign in to comment.