Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c6f7c7

Browse files
committed
explicit usage of --time-sec will implicitly turn off auto-adjustment of time delay
1 parent aed9941 commit 8c6f7c7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ def wasLastRequestDelayed():
18261826
lowerStdLimit = average(kb.responseTimes) + TIME_STDEV_COEFF * deviation
18271827
retVal = (threadData.lastQueryDuration >= lowerStdLimit)
18281828

1829-
if not kb.testMode and retVal and conf.timeSec == TIME_DEFAULT_DELAY:
1829+
if not kb.testMode and retVal and kb.adjustTimeDelay:
18301830
adjustTimeDelay(threadData.lastQueryDuration, lowerStdLimit)
18311831

18321832
return retVal

lib/core/option.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
from lib.core.settings import SYBASE_ALIASES
9090
from lib.core.settings import BURP_SPLITTER
9191
from lib.core.settings import MAX_NUMBER_OF_THREADS
92+
from lib.core.settings import TIME_DEFAULT_DELAY
9293
from lib.core.settings import TIME_DELAY_CANDIDATES
9394
from lib.core.settings import UNKNOWN_DBMS_VERSION
9495
from lib.core.settings import WEBSCARAB_SPLITTER
@@ -1196,6 +1197,8 @@ def __cleanupOptions():
11961197
if conf.data:
11971198
conf.data = urldecode(conf.data)
11981199

1200+
kb.adjustTimeDelay = (conf.timeSec == TIME_DEFAULT_DELAY)
1201+
11991202
def __setConfAttributes():
12001203
"""
12011204
This function set some needed attributes into the configuration
@@ -1237,6 +1240,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
12371240
logger.debug(debugMsg)
12381241

12391242
kb.absFilePaths = set()
1243+
kb.adjustTimeDelay = False
12401244
kb.authHeader = None
12411245
kb.bannerFp = advancedDict()
12421246

0 commit comments

Comments
 (0)