diff --git a/internal/service/dev_tools/connections.go b/internal/service/dev_tools/connections.go index b3c99a9..87f32e0 100644 --- a/internal/service/dev_tools/connections.go +++ b/internal/service/dev_tools/connections.go @@ -248,6 +248,10 @@ func (c *connections) GetRoomsConnectionUrls(ctx context.Context, token string) } for _, server := range uniqueServers { + if _, ok := uniqueServerType[server.ServerType]; ok { + continue + } + connNum, exists, err := server.GetConnectionsNum(ctx, token) if err != nil { c.logger.Error().Err(err).Msg("server error create room") @@ -258,10 +262,6 @@ func (c *connections) GetRoomsConnectionUrls(ctx context.Context, token string) continue } - if _, ok := uniqueServerType[server.ServerType]; ok { - continue - } - err = server.CreateRoom(ctx, token, time.Duration(time.Minute*10)) if err != nil { if err.Error() != errors.ErrRoomIsExists.Error() { diff --git a/internal/start/multiplatform.go b/internal/start/multiplatform.go index 6327bdd..80f67df 100644 --- a/internal/start/multiplatform.go +++ b/internal/start/multiplatform.go @@ -58,7 +58,7 @@ func Multiplayer(logger zerolog.Logger) { devToolsServerService := devtools.NewServerService(accessGameService, gameStorage, serverStorage, token, &logger) devToolsGameConfigs := devtools.NewGameConfigs(accessGameService, gameConfigStorage, token, &logger) - go connectionsScheduler.RoomCleaner(context.Background(), time.Minute*15, 300) + go connectionsScheduler.RoomCleaner(context.Background(), time.Minute*15, 0) services := []transport.Option{ transport.MaxBodySize(10 * 1024 * 1024),