1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 23:19:03 +00:00

added coded to stop spidering if the base coroutine is dead.

This commit is contained in:
patrik
2012-05-22 18:22:18 +00:00
parent b47d946195
commit cbf901c195

View File

@@ -501,6 +501,7 @@ Crawler = {
port = port, port = port,
url = url, url = url,
options = options or {}, options = options or {},
basethread = stdnse.base(),
} }
setmetatable(o, self) setmetatable(o, self)
@@ -606,7 +607,7 @@ Crawler = {
while(true) do while(true) do
if ( self.quit ) then if ( self.quit or coroutine.status(self.basethread) == 'dead' ) then
table.insert(response_queue, {false, { err = false, msg = "Quit signalled by crawler" } }) table.insert(response_queue, {false, { err = false, msg = "Quit signalled by crawler" } })
break break
end end