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