diff --git a/scan.lua b/scan.lua index fd43e51..b5c3d18 100644 --- a/scan.lua +++ b/scan.lua @@ -49,7 +49,7 @@ end function private.wait_for_results(k) if private.current_thread().params.type == 'bidder' then - return private.wait_for_bidder_results(k) + return Aux.control.wait_until(function() return Aux.bids_loaded end, k) elseif private.current_thread().params.type == 'owner' then return private.wait_for_owner_results(k) elseif private.current_thread().params.type == 'list' then @@ -57,14 +57,6 @@ function private.wait_for_results(k) end end -function private.wait_for_bidder_results(k) - if Aux.bids_loaded then - return k() - else -- recurse on the next update - return Aux.control.wait(private.wait_for_bidder_results, k) - end -end - function private.wait_for_owner_results(k) local updated if private.current_thread().page == Aux.current_owner_page then