Merge pull request #15 from PretendoNetwork/db-fix-attempt
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled

Attempt fix for DB strain
This commit is contained in:
shutterbug2000 2025-07-06 05:20:20 -05:00 committed by GitHub
commit 92f52d8404
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,17 +54,6 @@ func cleanupMatchmakeSessionSearchCriteriasHandler(searchCriterias types.List[ma
}
}
func onAfterAutoMatchmakeWithParamPostpone(_ nex.PacketInterface, _ match_making_types.AutoMatchmakeParam) {
globals.MatchmakingManager.Mutex.Lock()
_, err := globals.MatchmakingManager.Database.Exec(`UPDATE matchmaking.matchmake_sessions SET open_participation=true WHERE game_mode=12`)
if err != nil {
globals.Logger.Error(err.Error())
}
globals.MatchmakingManager.Mutex.Unlock()
}
func registerCommonSecureServerProtocols() {
secureProtocol := secure.NewProtocol()
globals.SecureEndpoint.RegisterServiceProtocol(secureProtocol)
@ -91,7 +80,6 @@ func registerCommonSecureServerProtocols() {
commonMatchmakeExtensionProtocol := commonmatchmakeextension.NewCommonProtocol(matchmakeExtensionProtocol)
matchmakeExtensionProtocol.SetHandlerGetPlayingSession(stubGetPlayingSession)
commonMatchmakeExtensionProtocol.CleanupMatchmakeSessionSearchCriterias = cleanupMatchmakeSessionSearchCriteriasHandler
commonMatchmakeExtensionProtocol.OnAfterAutoMatchmakeWithParamPostpone = onAfterAutoMatchmakeWithParamPostpone
commonMatchmakeExtensionProtocol.SetManager(globals.MatchmakingManager)
rankingProtocol := ranking.NewProtocol(globals.SecureEndpoint)