1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 18:39:03 +00:00

fixed a bug in a loop where the script would wait for a condition that was

supposed to be signalled by other threads which were no longer running.
This commit is contained in:
patrik
2012-08-29 05:37:56 +00:00
parent c71478d91f
commit 448bb5a71b
22 changed files with 72 additions and 26 deletions

View File

@@ -265,12 +265,14 @@ action = function()
-- wait for all threads to finish sniffing
repeat
condvar "wait"
for thread in pairs(threads) do
if coroutine.status(thread) == "dead" then
threads[thread] = nil
end
end
if ( next(threads) ) then
condvar "wait"
end
until next(threads) == nil
local out_outer = {}