fix: 修复消息阻塞

pull/624/head
tcmofashi 2025-03-29 00:52:53 +08:00
parent 19d2aaed52
commit df3a673a61
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,10 @@ class BaseMessageAPI:
while True:
if len(self.cache) > 0:
for handler in self.message_handlers:
await handler(self.cache[0])
try:
await handler(self.cache[0])
except:
pass
self.cache.pop(0)
if len(self.cache) > 0:
await asyncio.sleep(0.1 / len(self.cache))