mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-07-30 05:42:50 +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++;
|
_pool_in_use++;
|
||||||
return std::static_pointer_cast<T>(conn);
|
return std::static_pointer_cast<T>(conn);
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
|
_pool_errors++;
|
||||||
throw ConnectionUnavailable();
|
throw ConnectionUnavailable();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -121,11 +122,13 @@ public:
|
||||||
return std::static_pointer_cast<T>(conn);
|
return std::static_pointer_cast<T>(conn);
|
||||||
} catch(std::exception& e) {
|
} catch(std::exception& e) {
|
||||||
// Error creating a replacement connection
|
// Error creating a replacement connection
|
||||||
|
_pool_errors++;
|
||||||
throw ConnectionUnavailable();
|
throw ConnectionUnavailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Nothing available
|
// Nothing available
|
||||||
|
_pool_errors++;
|
||||||
throw ConnectionUnavailable();
|
throw ConnectionUnavailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue