diff options
| author | Grant Limberg <[email protected]> | 2023-06-08 08:45:50 -0700 |
|---|---|---|
| committer | Grant Limberg <[email protected]> | 2023-06-08 08:45:50 -0700 |
| commit | 3efb731b40372c5937f33a8feacdcbcd6bb4764f (patch) | |
| tree | 554ba06c57e80724998a344634efa5434430ad2d /controller/PostgreSQL.cpp | |
| parent | ce989d0d67cb665d236956d4dd5562803b5845ac (diff) | |
don't unborrow bad connections
pool will clean them up later
Diffstat (limited to 'controller/PostgreSQL.cpp')
| -rw-r--r-- | controller/PostgreSQL.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index 1ec46e89..319c0268 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -527,9 +527,6 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str _pool->unborrow(c); } catch (std::exception &e) { - if (c) { - _pool->unborrow(c); - } fprintf(stderr, "ERROR: Error updating member on load for network %s: %s\n", networkId.c_str(), e.what()); } @@ -1051,7 +1048,6 @@ void PostgreSQL::heartbeat() w.commit(); } catch (std::exception &e) { fprintf(stderr, "%s: Heartbeat update failed: %s\n", controllerId, e.what()); - _pool->unborrow(c); std::this_thread::sleep_for(std::chrono::milliseconds(1000)); continue; } |
