| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import json |
||
| 38 | async def _handle_ws_msg(self, http_request: web.Request, ws_msg: web_ws.WSMessage) -> None: |
||
| 39 | input_data = json.loads(ws_msg.data) |
||
| 40 | output_data = await self._process_input_data(input_data, http_request=http_request) |
||
| 41 | |||
| 42 | if http_request.ws._writer.transport.is_closing(): |
||
| 43 | self.clients.remove(http_request) |
||
| 44 | await http_request.ws.close() |
||
| 45 | |||
| 46 | await http_request.ws.send_str(self.json_serialize(output_data)) |
||
| 47 |