fix: increase RPC semaphore limit from 3 to 200 and wrap poller call in semaphore context manager

This commit is contained in:
2025-09-07 02:22:48 +00:00
parent c26f636e9d
commit 3d77653cbc
+3 -3
View File
@@ -52,7 +52,7 @@ class RPC:
self.ws = ws
self.current_call_id = None
self.queue = asyncio.Queue()
self.semaphore = asyncio.Semaphore(3)
self.semaphore = asyncio.Semaphore(200)
def __getattr__(self, name):
async def method(*args, **kwargs):
@@ -78,8 +78,8 @@ class RPC:
if no_response:
return True
return await poller()
with self.semaphore:
return await poller()
return method