File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,7 +180,6 @@ func (manager *SessionManager) UpdateProfile(profile *authorization.PersonalProf
180180
181181// Get Session by id
182182func (manager * SessionManager ) GetWhepSessionById (sessionId string ) (whep * whep.WhepSession , foundSession bool ) {
183-
184183 manager .sessionsLock .RLock ()
185184 defer manager .sessionsLock .RUnlock ()
186185
Original file line number Diff line number Diff line change @@ -142,9 +142,14 @@ func (session *Session) hostStatusLoop() {
142142 } else if session .Host .Load () != nil {
143143
144144 status := session .GetSessionStatsEvent ()
145+
145146 session .WhepSessionsLock .RLock ()
146- for _ , whep := range session .WhepSessions {
147- whep .SseEventsChannel <- status
147+ for _ , whepSession := range session .WhepSessions {
148+ select {
149+ case whepSession .SseEventsChannel <- status :
150+ default :
151+ log .Println ("Session.Host.HostStatusLoop: SSE channel full, skipping" , whepSession .SessionId )
152+ }
148153 }
149154 session .WhepSessionsLock .RUnlock ()
150155
You can’t perform that action at this time.
0 commit comments