diff options
| author | Jeff Garzik <[email protected]> | 2011-06-11 16:17:13 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2011-06-11 16:17:13 -0700 |
| commit | ce148944c776ae8e91cc058f44ddce356c7cebc9 (patch) | |
| tree | ce40033b63b17ee2527795781885a76310d5fe0d /src/init.cpp | |
| parent | Merge pull request #312 from codler/patch-1 (diff) | |
| parent | Faster timeout when connecting (diff) | |
| download | discoin-ce148944c776ae8e91cc058f44ddce356c7cebc9.tar.xz discoin-ce148944c776ae8e91cc058f44ddce356c7cebc9.zip | |
Merge pull request #300 from sipa/connecttimeoutv0.3.23rc1v0.3.23
non-blocking connect (by phantomcircuit)
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index a51046019..0e2113e7c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -151,6 +151,7 @@ bool AppInit2(int argc, char* argv[]) " -gen=0 \t\t " + _("Don't generate coins\n") + " -min \t\t " + _("Start minimized\n") + " -datadir=<dir> \t\t " + _("Specify data directory\n") + + " -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)\n") + " -proxy=<ip:port> \t " + _("Connect through socks4 proxy\n") + " -dns \t " + _("Allow DNS lookups for addnode and connect\n") + " -addnode=<ip> \t " + _("Add a node to connect to\n") + @@ -414,6 +415,13 @@ bool AppInit2(int argc, char* argv[]) return false; } + if (mapArgs.count("-timeout")) + { + int nNewTimeout = GetArg("-timeout", 5000); + if (nNewTimeout > 0 && nNewTimeout < 600000) + nConnectTimeout = nNewTimeout; + } + if (mapArgs.count("-printblock")) { string strMatch = mapArgs["-printblock"]; |