imLinguin / comet

Open Source implementation of GOG Galaxy Communication Service for SDK bundled with GOG games.
GNU General Public License v3.0
246 stars 10 forks source link

Crash if a game exits prematurely #4

Closed purplebar0 closed 8 months ago

purplebar0 commented 1 year ago

Tested on Absolute Drift (Windows version over Proton Experimental), exiting the game within the menus works fine, but closing it with SIGTERM crashes Comet.

40661
Accepting connection
INFO:handler:handle_message:Header 1|3
INFO:notification_pusher:handling_connection:started
INFO:notification_pusher:notification_message:2|2
INFO:notification_pusher:subscribing to chat, presence, friends
INFO:handler:handle_auth_request:authenticated the user redacted
INFO:handler:handle_message:responded with 1|4
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:friends
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:chat
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:presence
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:presence
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:chat
INFO:handler:handle_message:responded with 2|4
INFO:handler:handle_message:Header 1|15
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/serg/builds/comet/comet/main.py", line 86, in <module>
    asyncio.run(con_handler.handle_connection())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/serg/builds/comet/comet/handlers.py", line 131, in handle_connection
    await self.handle_message(header_size_bytes)
  File "/home/serg/builds/comet/comet/handlers.py", line 198, in handle_message
    self.connection.sendmsg([res_header_data_size, res_header_data, res.data])
BrokenPipeError: [Errno 32] Broken pipe
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8f47958c90>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f479260b0>, 15330.591777046)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f479256a0>, 15330.763322233)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f47925940>, 15333.26935718)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f8f47958e10>
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8f47b32cd0>