diff options
Diffstat (limited to 'odb/oracle/connection-factory.cxx')
-rw-r--r-- | odb/oracle/connection-factory.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/odb/oracle/connection-factory.cxx b/odb/oracle/connection-factory.cxx index ed59c35..30aa63f 100644 --- a/odb/oracle/connection-factory.cxx +++ b/odb/oracle/connection-factory.cxx @@ -126,9 +126,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_--; |