2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 16:35:23 +00:00

[#1369] More review fixes.

This commit is contained in:
Thomas Markwalder
2020-08-12 12:43:22 -04:00
parent 7d1f5e0e96
commit dea3ca2380
4 changed files with 8 additions and 8 deletions

View File

@@ -250,6 +250,7 @@ public:
static DbLostCallback db_lost_callback;
/// @brief Throws an exception if the connection is not usable.
/// @throw DbConnectionUnusable
void checkUnusable() {
if (unusable_) {
isc_throw (DbConnectionUnusable, "Attempt to use an invalid connection");
@@ -257,8 +258,7 @@ public:
}
protected:
/// @brief Sets the usable flag to the given value.
/// @param usable new value for the flag.
/// @brief Sets the unusable flag to true.
void markUnusable() { unusable_ = true; }
private:
@@ -272,10 +272,10 @@ private:
/// @brief Indicates if the connection can no longer be used for normal
/// operations. Typically a connection is marked unusable after an unrecoverable
/// DB error. There may be a time during which the connection exists after
/// DB error. There may be a time during which the connection exists after
/// such an every during which it cannot be used for anything beyond checking
/// parameters and error information. This flag can be used as a guard in
/// code to prevent inadvertant use of a broken connection.
/// parameters and error information. This flag can be used as a guard in
/// code to prevent inadvertent use of a broken connection.
bool unusable_;
};