Support SRTools web
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import asyncio
|
||||
from threading import Thread
|
||||
from game_server.srtools.server import run_flask
|
||||
from game_server.net.gateway import KCPGateway
|
||||
from utils.config import Config
|
||||
from game_server.resource import ResourceManager
|
||||
@@ -6,7 +8,7 @@ from game_server.resource import ResourceManager
|
||||
def fn_main():
|
||||
try:
|
||||
ResourceManager.instance().load_resources()
|
||||
asyncio.run(KCPGateway.new(Config.GameServer.IP,Config.GameServer.Port))
|
||||
Thread(target=run_flask, args=(Config.SRToolsServer.IP, Config.SRToolsServer.Port), daemon=True).start()
|
||||
asyncio.run(KCPGateway.new(Config.GameServer.IP, Config.GameServer.Port))
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user