Skip to content

Commit

Permalink
delay refresh session task
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 committed Dec 14, 2022
1 parent 4174304 commit c49c7e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ async def handle_message(id: str, message: str, timeout_task: asyncio.Task) -> s
if e:
logger.exception(e)
timeout_task.cancel()
refresh_task = bot.refresh_session()
if refresh_task:
await refresh_task
if resp:
return resp["message"]
if e:
refresh_task = bot.refresh_session()
if refresh_task:
await refresh_task
return config.response.error_format.format(exc=e)

async def send_task(target: Union[Friend, Group], app: Ariadne, source: Source):
Expand Down

0 comments on commit c49c7e8

Please sign in to comment.