CreateRoom API to actually create the room on an RTC node (#1155)

Previously, CreateRoom only created the room in storage, but did not
hydrate it on an RTC node. This has caused strange behaviors such as
emptyTimeout not working correctly (#1109).

Also reduced room reap worker to consistently reap rooms. Fixes #241
This commit is contained in:
David Zhao
2022-11-09 23:35:35 -08:00
committed by GitHub
parent d429fe11a7
commit e5d21cb1d9
3 changed files with 16 additions and 1 deletions
+4
View File
@@ -219,6 +219,10 @@ func (r *RoomManager) StartSession(
}
defer room.Release()
// only create the room, but don't start a participant session
if pi.Identity == "" {
return nil
}
participant := room.GetParticipant(pi.Identity)
if participant != nil {
// When reconnecting, it means WS has interrupted by underlying peer connection is still ok