Websocket connection failure
Created by: AbdusamadDev
Websocket connection is failing when making request:
in specific part of the code:
async def communicate(self, input_client): while True: # try: logging.info(" Target client life: " + str(input_client.open)) logging.info( " Target client address: " + str(input_client.remote_address) ) logging.info(" Keeping alive: [%s]" % datetime.now()) data = await input_client.recv() logging.info(f"Recieved Data: {data}") converted_message = (await input_client.to_dict(data)).keys() logging.info(f"Converted message: {converted_message}") if "message" not in converted_message: error_message = { "error": "validation_error", "message": "The 'message' key is required.", } await input_client.send_failure(error_message) continue await self.broadcast(data)
after execution of await input_client.recv() connection is closing with no reason.