forked from Hay1tsme/artemis
idz: fix userdb
This commit is contained in:
parent
83b981917e
commit
ce5888227e
@ -137,7 +137,7 @@ class IDZServlet(BaseServlet):
|
||||
continue
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
IDZUserDB(self.core_cfg, self.game_cfg, self.rsa_keys, handler_map)
|
||||
IDZUserDB(self.core_cfg, self.game_cfg, self.rsa_keys, handler_map).start()
|
||||
asyncio.create_task(
|
||||
loop.create_datagram_endpoint(
|
||||
lambda: IDZEcho(),
|
||||
@ -157,7 +157,6 @@ class IDZServlet(BaseServlet):
|
||||
)
|
||||
)
|
||||
|
||||
self.logger.info(f"UserDB Listening on port {self.game_cfg.ports.userdb}")
|
||||
|
||||
async def render_GET(self, request: Request) -> bytes:
|
||||
url_path = request.path_params.get('endpoint', '')
|
||||
|
@ -41,8 +41,8 @@ class IDZUserDB:
|
||||
self.skip_next = False
|
||||
|
||||
def start(self) -> None:
|
||||
self.logger.info(f"Start on port {self.config.aimedb.port}")
|
||||
asyncio.create_task(asyncio.start_server(self.connection_cb, self.config.server.listen_address, self.config.aimedb.port))
|
||||
self.logger.info(f"Start on port {self.game_config.ports.userdb}")
|
||||
asyncio.create_task(asyncio.start_server(self.connection_cb, self.core_config.server.listen_address, self.game_config.ports.userdb))
|
||||
|
||||
def append_padding(self, data: bytes):
|
||||
"""Appends 0s to the end of the data until it's at the correct size"""
|
||||
@ -81,7 +81,7 @@ class IDZUserDB:
|
||||
self.logger.debug("Connection closed")
|
||||
return
|
||||
|
||||
await self.data.Received(data, reader, writer)
|
||||
await self.dataReceived(data, reader, writer)
|
||||
await writer.drain()
|
||||
|
||||
except ConnectionResetError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user