From 80d3ff67064f612527c33c0a4dbb84e5ad483a67 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 2 Dec 2015 12:05:40 +0100 Subject: [PATCH] Adding hidden switch for disabling socket preconnect (debugging purposes) --- lib/core/option.py | 3 +++ lib/parse/cmdline.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 7fe25005d..d3a7e64dd 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1024,6 +1024,9 @@ def _setSocketPreConnect(): Makes a pre-connect version of socket.connect """ + if conf.disablePrecon: + return + def _(): while kb.threadContinue: try: diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 68bad2f3f..131421903 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -754,6 +754,9 @@ def cmdLineParser(argv=None): parser.add_option("--pickled-options", dest="pickledOptions", help=SUPPRESS_HELP) + parser.add_option("--disable-precon", dest="disablePrecon", action="store_true", + help=SUPPRESS_HELP) + parser.add_option("--profile", dest="profile", action="store_true", help=SUPPRESS_HELP) @@ -780,9 +783,6 @@ def cmdLineParser(argv=None): parser.add_option("--run-case", dest="runCase", help=SUPPRESS_HELP) - parser.add_option("--nnc5ed", dest="nnc5ed", action="store_true", - help=SUPPRESS_HELP) # temporary hidden switch :) - parser.add_option_group(target) parser.add_option_group(request) parser.add_option_group(optimization)