Disconnects the WebSocket server and stops the associated thread. This method is responsible for disconnecting the WebSocket server, stopping the asyncio thread, and resetting the global variables related to the WebSocket connection.
(cls)
| 179 | |
| 180 | @classmethod |
| 181 | def disconnect_websocket_server(cls) -> None: |
| 182 | """ |
| 183 | Disconnects the WebSocket server and stops the associated thread. |
| 184 | |
| 185 | This method is responsible for disconnecting the WebSocket server, stopping the asyncio thread, |
| 186 | and resetting the global variables related to the WebSocket connection. |
| 187 | """ |
| 188 | global ws_thread, sio |
| 189 | ws_thread.run_coro(cls.sio_disconnect()) |
| 190 | ws_thread.stop() |
| 191 | ws_thread = None |
| 192 | sio = None |
| 193 | cls.set_is_connected(False) |
| 194 | |
| 195 | @classmethod |
| 196 | def kill_websocket_server(cls) -> None: |
no test coverage detected