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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user