1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +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

@@ -389,10 +389,12 @@ action = function( host, port )
-- wait for all threads to finish up
repeat
condvar "wait"
for t in pairs(threads) do
if ( coroutine.status(t) == "dead" ) then threads[t] = nil end
end
if ( next(threads) ) then
condvar "wait"
end
until( next(threads) == nil )
if ( #result > 0 ) then