From 49078b178f2727fece75d684cdc1cd700d10d8ec Mon Sep 17 00:00:00 2001 From: patrik Date: Sat, 7 Apr 2012 09:10:24 +0000 Subject: [PATCH] fixed deadlock when calling stop and the thread was already dead --- nselib/httpspider.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index 1657a0a17..b0880609a 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -818,6 +818,9 @@ Crawler = { local condvar = nmap.condvar(self.response_queue) self.quit = true condvar "signal" + if ( coroutine.status(self.thread) == "dead" ) then + return + end condvar "wait" end }