mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Clean up interrupt listener
This commit is contained in:
parent
888f00dd8b
commit
30dc027e3e
1 changed files with 3 additions and 5 deletions
|
@ -66,13 +66,11 @@ impl<'lua, 'fut> Scheduler<'lua, 'fut> {
|
|||
let state = this.state.clone();
|
||||
lua.set_interrupt(move |_| {
|
||||
if let Some(id) = state.get_current_thread_id() {
|
||||
match state.get_thread_error(id) {
|
||||
Some(e) => Err(e),
|
||||
None => Ok(LuaVmState::Continue),
|
||||
if let Some(err) = state.get_thread_error(id) {
|
||||
return Err(err);
|
||||
}
|
||||
} else {
|
||||
Ok(LuaVmState::Continue)
|
||||
}
|
||||
Ok(LuaVmState::Continue)
|
||||
});
|
||||
|
||||
this
|
||||
|
|
Loading…
Reference in a new issue