nextcord-ext-ipc
nextcord-ext-ipc copied to clipboard
RuntimeError: Concurrent call to receive() is not allowed error with 2 clients.
I have one websocket server with 2 clients connected to it. The first one works fine but the second one throws this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1467, in handle_request
return await self.full_dispatch_request(request_context)
File "/usr/local/lib/python3.8/dist-packages/quart/flask_patch/app.py", line 26, in new_full_dispatch_request
return await old_full_dispatch_request(self, request_context)
File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1492, in full_dispatch_request
result = await self.handle_user_exception(error)
File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 968, in handle_user_exception
raise error
File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1490, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1536, in dispatch_request
return await self.ensure_async(handler)(**request_.view_args)
File "/var/www/fm01.hu/public_html/main.py", line 51, in web_gen
name = await ipc_client.request("get_guild_name", serverid=row["serverid"])
File "/usr/local/lib/python3.8/dist-packages/nextcord/ext/ipc/client.py", line 108, in request
recv = await self.websocket.receive()
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_ws.py", line 217, in receive
raise RuntimeError("Concurrent call to receive() is not allowed")
RuntimeError: Concurrent call to receive() is not allowed
I found this issue regarding this: https://github.com/aio-libs/aiohttp/issues/999 , https://github.com/aio-libs/aiohttp/issues/2940
While not ideally, this could be resolved through some form of built in request queue system: https://workbin.dev/?id=1674264380936187
To return the results: https://workbin.dev/?id=1674269027299811