aiohttp-json-rpc
aiohttp-json-rpc copied to clipboard
ValueError: list.remove(x): x not in list ib rpc.py modle
the snippet below
async def _ws_send_str(self, client, string):
if client.ws._writer.transport.is_closing():
self.clients.remove(client)
await client.ws.close()
cause the error below self.clients.remove(client) ValueError: list.remove(x): x not in list
Hi @Noor-Kalibbala! Could you try if this snippet solves your problem?
async def _ws_send_str(self, client, string):
if client.ws._writer.transport.is_closing():
if client in self.clients:
self.clients.remove(client)
await client.ws.close()
@fscherf this error it randomly happens, anyway u mean i replace the previous snippet with this snippet in package source code
@fscherf thanks, it works well