File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 18
18
#include < compat/sanity.h>
19
19
#include < consensus/validation.h>
20
20
#include < fs.h>
21
+ #include < hash.h>
21
22
#include < httprpc.h>
22
23
#include < httpserver.h>
23
24
#include < index/blockfilterindex.h>
42
43
#include < script/sigcache.h>
43
44
#include < script/standard.h>
44
45
#include < shutdown.h>
46
+ #include < sync.h>
45
47
#include < timedata.h>
46
48
#include < torcontrol.h>
47
49
#include < txdb.h>
53
55
#include < util/threadnames.h>
54
56
#include < util/translation.h>
55
57
#include < validation.h>
56
- #include < hash.h>
57
-
58
58
59
59
#include < validationinterface.h>
60
60
#include < walletinitinterface.h>
@@ -171,11 +171,10 @@ void Interrupt(NodeContext& node)
171
171
172
172
void Shutdown (NodeContext& node)
173
173
{
174
+ static Mutex g_shutdown_mutex;
175
+ TRY_LOCK (g_shutdown_mutex, lock_shutdown);
176
+ if (!lock_shutdown) return ;
174
177
LogPrintf (" %s: In progress...\n " , __func__);
175
- static RecursiveMutex cs_Shutdown;
176
- TRY_LOCK (cs_Shutdown, lockShutdown);
177
- if (!lockShutdown)
178
- return ;
179
178
180
179
// / Note: Shutdown() must be able to handle cases in which initialization failed part of the way,
181
180
// / for example if the data directory was found to be locked.
You can’t perform that action at this time.
0 commit comments