mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-03 18:02:33 +00:00
Merge PR #1029: fix: break Discord typing loop on persistent HTTP failure
This commit is contained in:
commit
c76a8d2e83
@ -285,8 +285,11 @@ class DiscordChannel(BaseChannel):
|
||||
while self._running:
|
||||
try:
|
||||
await self._http.post(url, headers=headers)
|
||||
except Exception:
|
||||
pass
|
||||
except asyncio.CancelledError:
|
||||
return
|
||||
except Exception as e:
|
||||
logger.debug("Discord typing indicator failed for {}: {}", channel_id, e)
|
||||
return
|
||||
await asyncio.sleep(8)
|
||||
|
||||
self._typing_tasks[channel_id] = asyncio.create_task(typing_loop())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user