diff options
Diffstat (limited to 'odb/mysql/connection-factory.cxx')
-rw-r--r-- | odb/mysql/connection-factory.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/odb/mysql/connection-factory.cxx b/odb/mysql/connection-factory.cxx index dce0f97..b9b3d19 100644 --- a/odb/mysql/connection-factory.cxx +++ b/odb/mysql/connection-factory.cxx @@ -230,9 +230,10 @@ namespace odb // Determine if we need to keep or free this connection. // - bool keep (waiters_ != 0 || - min_ == 0 || - (connections_.size () + in_use_ <= min_)); + bool keep (!c->failed () && + (waiters_ != 0 || + min_ == 0 || + (connections_.size () + in_use_ <= min_))); in_use_--; |