Skip to content
Snippets Groups Projects
  • Florian Schröder's avatar
    9e25fd1d
    Refactor websocket handling and improve test module · 9e25fd1d
    Florian Schröder authored
    Websocket handling was significantly refactored to improve management of active websocket connections. Now, each connection is assigned to a concurrently running task. A timeout component was introduced within `recv_messages` function, which handles failed message receipt better by catching `CancelledError` and `TimeoutError` effectively. This enhance reliability of message receipt process.
    
    Furthermore, a `terminate` method was added which efficiently closes all active websocket connections. In the test module, print statements were introduced to trace the connection process in the 'else' block, and the 'send' function call was moved into this block as well.
    9e25fd1d
    History
    Refactor websocket handling and improve test module
    Florian Schröder authored
    Websocket handling was significantly refactored to improve management of active websocket connections. Now, each connection is assigned to a concurrently running task. A timeout component was introduced within `recv_messages` function, which handles failed message receipt better by catching `CancelledError` and `TimeoutError` effectively. This enhance reliability of message receipt process.
    
    Furthermore, a `terminate` method was added which efficiently closes all active websocket connections. In the test module, print statements were introduced to trace the connection process in the 'else' block, and the 'send' function call was moved into this block as well.