diff options
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 05b4e87ce..a1e45b1c6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -40,10 +40,13 @@ void Shutdown(void* parg) static CCriticalSection cs_Shutdown; static bool fTaken; bool fFirstThread = false; - TRY_CRITICAL_BLOCK(cs_Shutdown) { - fFirstThread = !fTaken; - fTaken = true; + TRY_LOCK(cs_Shutdown, lockShutdown); + if (lockShutdown) + { + fFirstThread = !fTaken; + fTaken = true; + } } static bool fExit; if (fFirstThread) @@ -171,6 +174,7 @@ bool AppInit2(int argc, char* argv[]) " -splash \t\t " + _("Show splash screen on startup (default: 1)") + "\n" + " -datadir=<dir> \t\t " + _("Specify data directory") + "\n" + " -dbcache=<n> \t\t " + _("Set database cache size in megabytes (default: 25)") + "\n" + + " -dblogsize=<n> \t\t " + _("Set database disk log size in megabytes (default: 100)") + "\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" + |