Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Concurrent call to receive() is not allowed error with 2 clients. #12

Open
FightMan01 opened this issue Nov 1, 2021 · 1 comment
Labels
t: unconfirmed bug Type: bug - needs testing on if this is an issue

Comments

@FightMan01
Copy link

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: aio-libs/aiohttp#999 , aio-libs/aiohttp#2940

@DenverCoder1 DenverCoder1 added the t: unconfirmed bug Type: bug - needs testing on if this is an issue label Jun 27, 2022
@Skelmis
Copy link
Contributor

Skelmis commented Jan 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: unconfirmed bug Type: bug - needs testing on if this is an issue
Projects
None yet
Development

No branches or pull requests

3 participants