room 인원을 count에 저장

This commit is contained in:
2023-08-06 12:28:11 +09:00
parent d6738b2b70
commit 6f9f791f02
2 changed files with 7 additions and 2 deletions

View File

@ -362,7 +362,7 @@ func (sh *subhandler) mainLoop(ctx context.Context) {
findRoom := func(name string, create bool) *room {
room := rooms[name]
if room == nil && create {
room = makeRoom(name, roomDestroyChan, sh.sendMsgChan)
room = makeRoom(name, sh.redisSync, roomDestroyChan, sh.sendMsgChan)
rooms[name] = room
room.start(ctx)
go sh.callReceiver.OnRoomCreated(sh.region, name)