diff --git a/lib/core/common.py b/lib/core/common.py index 5619f81c1..070142ae1 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1109,4 +1109,4 @@ def parseXmlFile(xmlFile, handler): xfile.close() def calculateDeltaSeconds(start, epsilon=0.05): - return int(time.time() - start + epsilon) \ No newline at end of file + return int(time.time() - start + epsilon) diff --git a/lib/core/option.py b/lib/core/option.py index f60cd1810..cbc401d21 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -878,32 +878,33 @@ def __setConfAttributes(): debugMsg = "initializing the configuration" logger.debug(debugMsg) - conf.cj = None - conf.dbmsConnector = None - conf.dbmsHandler = None - conf.dumpPath = None - conf.httpHeaders = [] - conf.hostname = None - conf.loggedToOut = None - conf.matchRatio = None - conf.md5hash = None - conf.multipleTargets = False - conf.outputPath = None - conf.paramDict = {} - conf.parameters = {} - conf.path = None - conf.port = None - conf.redirectHandled = False - conf.retriesCount = 0 - conf.scheme = None - #conf.seqMatcher = difflib.SequenceMatcher(lambda x: x in " \t") - conf.seqMatcher = difflib.SequenceMatcher(None) - conf.seqLock = None - conf.sessionFP = None - conf.start = True - conf.threadContinue = True - conf.threadException = False - conf.wFileType = None + conf.cpuThrottleDelay = 0.001 + conf.cj = None + conf.dbmsConnector = None + conf.dbmsHandler = None + conf.dumpPath = None + conf.httpHeaders = [] + conf.hostname = None + conf.loggedToOut = None + conf.matchRatio = None + conf.md5hash = None + conf.multipleTargets = False + conf.outputPath = None + conf.paramDict = {} + conf.parameters = {} + conf.path = None + conf.port = None + conf.redirectHandled = False + conf.retriesCount = 0 + conf.scheme = None + #conf.seqMatcher = difflib.SequenceMatcher(lambda x: x in " \t") + conf.seqMatcher = difflib.SequenceMatcher(None) + conf.seqLock = None + conf.sessionFP = None + conf.start = True + conf.threadContinue = True + conf.threadException = False + conf.wFileType = None width = getConsoleWidth() diff --git a/lib/request/connect.py b/lib/request/connect.py index 38aa09ff4..248852fc7 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -262,6 +262,8 @@ class Connect: logger.log(8, responseMsg) + time.sleep(conf.cpuThrottleDelay) + return page, responseHeaders @staticmethod