refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-04 14:03:37 +02:00
parent a4d497b47b
commit cfa7ed5d14
6 changed files with 43 additions and 46 deletions
+2 -4
View File
@@ -107,11 +107,9 @@ function public.stop()
if state then
kill_thread(state.thread_id)
local callback, slot = state.callback, state.target_slot
if slot and not matching_item(slot) then
slot = nil
end
slot = slot and matching_item(slot) and slot or nil
state = nil
call(callback, slot)
(callback or nop)(slot)
end
end