mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 09:24:47 +00:00
rpc: do not propagate exceptions out of a dtor
Coverity 205415
This commit is contained in:
parent
3c849188ab
commit
d56a483abe
1 changed files with 8 additions and 4 deletions
|
@ -86,11 +86,15 @@ namespace
|
||||||
RPCTracker(const char *rpc, tools::LoggingPerformanceTimer &timer): rpc(rpc), timer(timer) {
|
RPCTracker(const char *rpc, tools::LoggingPerformanceTimer &timer): rpc(rpc), timer(timer) {
|
||||||
}
|
}
|
||||||
~RPCTracker() {
|
~RPCTracker() {
|
||||||
|
try
|
||||||
|
{
|
||||||
boost::unique_lock<boost::mutex> lock(mutex);
|
boost::unique_lock<boost::mutex> lock(mutex);
|
||||||
auto &e = tracker[rpc];
|
auto &e = tracker[rpc];
|
||||||
++e.count;
|
++e.count;
|
||||||
e.time += timer.value();
|
e.time += timer.value();
|
||||||
}
|
}
|
||||||
|
catch (...) { /* ignore */ }
|
||||||
|
}
|
||||||
void pay(uint64_t amount) {
|
void pay(uint64_t amount) {
|
||||||
boost::unique_lock<boost::mutex> lock(mutex);
|
boost::unique_lock<boost::mutex> lock(mutex);
|
||||||
auto &e = tracker[rpc];
|
auto &e = tracker[rpc];
|
||||||
|
|
Loading…
Reference in a new issue