increment error counter on throw

This commit is contained in:
Grant Limberg 2023-04-20 07:40:04 -07:00
parent 499ed6d95e
commit f354851747
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735

View file

@ -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();
}
}