minor bug fix for multithreading and lots of connection retries

This commit is contained in:
Miroslav Stampar 2011-05-10 12:40:01 +00:00
parent 22a1870c2c
commit a64407d9db
2 changed files with 3 additions and 4 deletions

View File

@ -1355,7 +1355,6 @@ def __setKnowledgeBaseAttributes(flushAll=True):
kb.redirectSetCookie = None
kb.responseTimes = []
kb.resumedQueries = {}
kb.retriesCount = 0
kb.singleLogFlags = set()
kb.skipOthersDbms = None
kb.suppressSession = False

View File

@ -255,7 +255,7 @@ class Connect:
conf.redirectHandled = True
# Reset the number of connection retries
kb.retriesCount = 0
threadData.retriesCount = 0
# Return response object
if response:
@ -379,8 +379,8 @@ class Connect:
return None, None
elif silent or (ignoreTimeout and any(map(lambda x: x in tbMsg, ["timed out", "IncompleteRead"]))):
return None, None
elif kb.retriesCount < conf.retries and not kb.threadException and not conf.realTest:
kb.retriesCount += 1
elif threadData.retriesCount < conf.retries and not kb.threadException and not conf.realTest:
threadData.retriesCount += 1
warnMsg += ", sqlmap is going to retry the request"
logger.critical(warnMsg)