aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rpc/core_rpc_server.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index dbacd489d..858b35df2 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -86,10 +86,14 @@ namespace
RPCTracker(const char *rpc, tools::LoggingPerformanceTimer &timer): rpc(rpc), timer(timer) {
}
~RPCTracker() {
- boost::unique_lock<boost::mutex> lock(mutex);
- auto &e = tracker[rpc];
- ++e.count;
- e.time += timer.value();
+ try
+ {
+ boost::unique_lock<boost::mutex> lock(mutex);
+ auto &e = tracker[rpc];
+ ++e.count;
+ e.time += timer.value();
+ }
+ catch (...) { /* ignore */ }
}
void pay(uint64_t amount) {
boost::unique_lock<boost::mutex> lock(mutex);