mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Silence task.wait error in canceled tasks
This commit is contained in:
parent
fcf59455db
commit
1011db6372
1 changed files with 2 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::fmt::Debug;
|
||||
use std::sync::Weak;
|
||||
|
||||
use mlua::prelude::*;
|
||||
|
@ -43,6 +44,7 @@ pub async fn run_registered_task<T>(
|
|||
sender
|
||||
.send(match to_run.await {
|
||||
Ok(_) => LuneMessage::Finished,
|
||||
Err(LuaError::CoroutineInactive) => LuneMessage::Finished, // Task was canceled
|
||||
Err(e) => LuneMessage::LuaError(e),
|
||||
})
|
||||
.await
|
||||
|
|
Loading…
Reference in a new issue