Index: scripts/broadcast-igmp-discovery.nse =================================================================== --- scripts/broadcast-igmp-discovery.nse (revision 29694) +++ scripts/broadcast-igmp-discovery.nse (working copy) @@ -309,10 +309,12 @@ local condvar = nmap.condvar(responses) -- Wait for the listening threads to finish repeat - condvar("wait") for thread in pairs(lthreads) do if coroutine.status(thread) == "dead" then lthreads[thread] = nil end end + if ( next(lthreads) ) then + condvar("wait") + end until next(lthreads) == nil; -- Output useful info from the responses