customserver: fix minor memory leak (#3636)

Old code keeps ref to last started room's task and thus never fully cleans it up.
This commit is contained in:
black-sliver 2024-07-14 13:56:56 +02:00 committed by GitHub
parent 187f9dac94
commit 948f50f35d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -330,6 +330,7 @@ def run_server_process(name: str, ponyconfig: dict, static_server_data: dict,
self._tasks.append(task)
task.add_done_callback(self._done)
logging.info(f"Starting room {next_room} on {name}.")
del task # delete reference to task object
starter = Starter()
starter.daemon = True