From 7acf67751619ef572af3652dcb579546663b5c61 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 6 Nov 2016 21:24:31 +0100 Subject: [PATCH] performance improvements --- core/scan.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scan.lua b/core/scan.lua index af5ae6f..623091c 100644 --- a/core/scan.lua +++ b/core/scan.lua @@ -39,8 +39,7 @@ do end function M.stop() - state.params.queries = {{}} - state.query_index = 1 + state.stopped = true end function complete() @@ -74,7 +73,7 @@ end function scan() state.query_index = state.query_index and state.query_index + 1 or 1 - if query then + if query and not state.stopped then do (state.params.on_start_query or nop)(state.query_index) end if query.blizzard_query then if (query.blizzard_query.first_page or 0) <= (query.blizzard_query.last_page or huge) then @@ -113,6 +112,7 @@ do return wait_for_results() end function submit_query() + if state.stopped then return end if state.params.type ~= 'list' then return submit() else