mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-03-21 17:34:21 -05:00
Force initialization of database in master server
This commit is contained in:
parent
d1ecc4e480
commit
0c19e2683d
|
|
@ -7,6 +7,8 @@ from gamespy_server_browser_server import GameSpyServerBrowserServer
|
|||
from gamespy_gamestats_server import GameSpyGamestatsServer
|
||||
from nintendo_nas_server import NintendoNasServer
|
||||
|
||||
import gamespy.gs_database as gs_database
|
||||
|
||||
import threading
|
||||
|
||||
def start_backend_server():
|
||||
|
|
@ -42,6 +44,11 @@ def start_nas_server():
|
|||
nas_server.start()
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Let database initialize before starting any servers.
|
||||
# This fixes any conflicts where two servers find an uninitialized database at the same time and both try to
|
||||
# initialize it.
|
||||
database = gs_database.GamespyDatabase()
|
||||
|
||||
backend_server_thread = threading.Thread(target=start_backend_server)
|
||||
backend_server_thread.start()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user