mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 12:19:09 +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 std::sync::Weak;
|
||||||
|
|
||||||
use mlua::prelude::*;
|
use mlua::prelude::*;
|
||||||
|
@ -43,6 +44,7 @@ pub async fn run_registered_task<T>(
|
||||||
sender
|
sender
|
||||||
.send(match to_run.await {
|
.send(match to_run.await {
|
||||||
Ok(_) => LuneMessage::Finished,
|
Ok(_) => LuneMessage::Finished,
|
||||||
|
Err(LuaError::CoroutineInactive) => LuneMessage::Finished, // Task was canceled
|
||||||
Err(e) => LuneMessage::LuaError(e),
|
Err(e) => LuneMessage::LuaError(e),
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in a new issue