mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-07-27 12:42:49 +02:00
increment error counter on throw
This commit is contained in:
parent
499ed6d95e
commit
f354851747
1 changed files with 3 additions and 0 deletions
|
@ -106,6 +106,7 @@ public:
|
|||
_pool_in_use++;
|
||||
return std::static_pointer_cast<T>(conn);
|
||||
} catch (std::exception &e) {
|
||||
_pool_errors++;
|
||||
throw ConnectionUnavailable();
|
||||
}
|
||||
} else {
|
||||
|
@ -121,11 +122,13 @@ public:
|
|||
return std::static_pointer_cast<T>(conn);
|
||||
} catch(std::exception& e) {
|
||||
// Error creating a replacement connection
|
||||
_pool_errors++;
|
||||
throw ConnectionUnavailable();
|
||||
}
|
||||
}
|
||||
}
|
||||
// Nothing available
|
||||
_pool_errors++;
|
||||
throw ConnectionUnavailable();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue