From ce5888227e25c44466ba7bf056a4fff5e70b8907 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Tue, 23 Jan 2024 11:31:09 -0500 Subject: [PATCH] idz: fix userdb --- titles/idz/index.py | 3 +-- titles/idz/userdb.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/titles/idz/index.py b/titles/idz/index.py index 05769d5..0ff5b8d 100644 --- a/titles/idz/index.py +++ b/titles/idz/index.py @@ -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', '') diff --git a/titles/idz/userdb.py b/titles/idz/userdb.py index 47a9102..089778a 100644 --- a/titles/idz/userdb.py +++ b/titles/idz/userdb.py @@ -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: