File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 20
20
#include < mutex>
21
21
#include < unordered_map>
22
22
23
- static RecursiveMutex cs_rpcWarmup ;
23
+ static Mutex g_rpc_warmup_mutex ;
24
24
static std::atomic<bool > g_rpc_running{false };
25
- static bool fRPCInWarmup GUARDED_BY (cs_rpcWarmup ) = true;
26
- static std::string rpcWarmupStatus GUARDED_BY (cs_rpcWarmup ) = "RPC server started";
25
+ static bool fRPCInWarmup GUARDED_BY (g_rpc_warmup_mutex ) = true;
26
+ static std::string rpcWarmupStatus GUARDED_BY (g_rpc_warmup_mutex ) = "RPC server started";
27
27
/* Timer-creating functions */
28
28
static RPCTimerInterface* timerInterface = nullptr ;
29
29
/* Map of name to timer. */
@@ -327,20 +327,20 @@ void RpcInterruptionPoint()
327
327
328
328
void SetRPCWarmupStatus (const std::string& newStatus)
329
329
{
330
- LOCK (cs_rpcWarmup );
330
+ LOCK (g_rpc_warmup_mutex );
331
331
rpcWarmupStatus = newStatus;
332
332
}
333
333
334
334
void SetRPCWarmupFinished ()
335
335
{
336
- LOCK (cs_rpcWarmup );
336
+ LOCK (g_rpc_warmup_mutex );
337
337
assert (fRPCInWarmup );
338
338
fRPCInWarmup = false ;
339
339
}
340
340
341
341
bool RPCIsInWarmup (std::string *outStatus)
342
342
{
343
- LOCK (cs_rpcWarmup );
343
+ LOCK (g_rpc_warmup_mutex );
344
344
if (outStatus)
345
345
*outStatus = rpcWarmupStatus;
346
346
return fRPCInWarmup ;
@@ -439,7 +439,7 @@ UniValue CRPCTable::execute(const JSONRPCRequest &request) const
439
439
{
440
440
// Return immediately if in warmup
441
441
{
442
- LOCK (cs_rpcWarmup );
442
+ LOCK (g_rpc_warmup_mutex );
443
443
if (fRPCInWarmup )
444
444
throw JSONRPCError (RPC_IN_WARMUP, rpcWarmupStatus);
445
445
}
You can’t perform that action at this time.
0 commit comments