Skip to content

Commit

Permalink
wait 1 second more
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Nov 22, 2023
1 parent 4241c40 commit 3b71344
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/models/room_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ func NewRoomAuthModel() *RoomAuthModel {
func (am *RoomAuthModel) CreateRoom(r *plugnmeet.CreateRoomReq) (bool, string, *livekit.Room) {
exist, err := am.rs.ManageActiveRoomsWithMetadata(r.GetRoomId(), "get", "")
if err == nil && exist != nil {
waitUntil := config.WAIT_BEFORE_TRIGGER_ON_AFTER_ROOM_ENDED + (1 * time.Second)
// maybe this room was ended just now, so we'll wait until clean up done
log.Infoln("this room:", r.GetRoomId(), "still active, we'll wait for:", config.WAIT_BEFORE_TRIGGER_ON_AFTER_ROOM_ENDED, "before recreating it again.")
time.Sleep(config.WAIT_BEFORE_TRIGGER_ON_AFTER_ROOM_ENDED)
log.Infoln("this room:", r.GetRoomId(), "still active, we'll wait for:", waitUntil, "before recreating it again.")
time.Sleep(waitUntil)
}

roomDbInfo, _ := am.rm.GetRoomInfo(r.RoomId, "", 1)
Expand Down

0 comments on commit 3b71344

Please sign in to comment.