mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
added coded to stop spidering if the base coroutine is dead.
This commit is contained in:
parent
b47d946195
commit
cbf901c195
1 changed files with 2 additions and 1 deletions
|
|
@ -501,6 +501,7 @@ Crawler = {
|
|||
port = port,
|
||||
url = url,
|
||||
options = options or {},
|
||||
basethread = stdnse.base(),
|
||||
}
|
||||
|
||||
setmetatable(o, self)
|
||||
|
|
@ -606,7 +607,7 @@ Crawler = {
|
|||
|
||||
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" } })
|
||||
break
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue