<commit_before>package lila.lobby

import com.softwaremill.macwire._
import play.api.Configuration
import scala.concurrent.duration._

import lila.common.config._

@Module
final class Env(
    appConfig: Configuration,
    db: lila.db.Db,
    onStart: lila.round.OnStart,
    relationApi: lila.relation.RelationApi,
    playbanApi: lila.playban.PlaybanApi,
    gameCache: lila.game.Cached,
    userRepo: lila.user.UserRepo,
    gameRepo: lila.game.GameRepo,
    poolApi: lila.pool.PoolApi,
    cacheApi: lila.memo.CacheApi,
    remoteSocketApi: lila.socket.RemoteSocket
)(implicit
    ec: scala.concurrent.ExecutionContext,
    system: akka.actor.ActorSystem,
    idGenerator: lila.game.IdGenerator
) {

  private lazy val maxPlaying = appConfig.get[Max]("setup.max_playing")

  private lazy val seekApiConfig = new SeekApi.Config(
    coll = db(CollName("seek")),
    archiveColl = db(CollName("seek_archive")),
    maxPerPage = MaxPerPage(13),
    maxPerUser = Max(5)
  )

  lazy val seekApi = wire[SeekApi]

  lazy val boardApiHookStream = wire[BoardApiHookStream]

  private lazy val lobbyTrouper = LobbyTrouper.start(
    broomPeriod = 2 seconds,
    resyncIdsPeriod = 25 seconds
  ) { () =>
    wire[LobbyTrouper]
  }

  private lazy val abortListener = wire[AbortListener]

  private lazy val biter = wire[Biter]

  lazy val socket = wire[LobbySocket]

  lila.common.Bus.subscribeFun("abortGame") { case lila.game.actorApi.AbortedBy(pov) =>
    abortListener(pov)
  }
}<commit_msg>eagerly instanciate the lobby socket<commit_after>package lila.lobby

import com.softwaremill.macwire._
import play.api.Configuration
import scala.concurrent.duration._

import lila.common.config._

@Module
final class Env(
    appConfig: Configuration,
    db: lila.db.Db,
    onStart: lila.round.OnStart,
    relationApi: lila.relation.RelationApi,
    playbanApi: lila.playban.PlaybanApi,
    gameCache: lila.game.Cached,
    userRepo: lila.user.UserRepo,
    gameRepo: lila.game.GameRepo,
    poolApi: lila.pool.PoolApi,
    cacheApi: lila.memo.CacheApi,
    remoteSocketApi: lila.socket.RemoteSocket
)(implicit
    ec: scala.concurrent.ExecutionContext,
    system: akka.actor.ActorSystem,
    idGenerator: lila.game.IdGenerator
) {

  private lazy val maxPlaying = appConfig.get[Max]("setup.max_playing")

  private lazy val seekApiConfig = new SeekApi.Config(
    coll = db(CollName("seek")),
    archiveColl = db(CollName("seek_archive")),
    maxPerPage = MaxPerPage(13),
    maxPerUser = Max(5)
  )

  lazy val seekApi = wire[SeekApi]

  lazy val boardApiHookStream = wire[BoardApiHookStream]

  private lazy val lobbyTrouper = LobbyTrouper.start(
    broomPeriod = 2 seconds,
    resyncIdsPeriod = 25 seconds
  ) { () =>
    wire[LobbyTrouper]
  }

  private lazy val abortListener = wire[AbortListener]

  private lazy val biter = wire[Biter]

  val socket = wire[LobbySocket]

  lila.common.Bus.subscribeFun("abortGame") { case lila.game.actorApi.AbortedBy(pov) =>
    abortListener(pov)
  }
}
{'fraction_non_alphanumeric': 0.10554442217768871, 'fraction_numerical': 0.004008016032064128, 'mean_word_length': 3.975083056478405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4310771', 'n_tokens_mistral': 1042, 'n_tokens_neox': 1027, 'n_words': 203}