PostgresSQL: make sure session is freed when disconnecting even if its status is not OK.

This commit is contained in:
Friedrich Wilckens
2023-10-30 13:50:45 -07:00
parent 0024f3621b
commit 9fcc2fd54d

View File

@@ -143,7 +143,7 @@ void SessionHandle::disconnect()
{ {
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex); Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (isConnectedNoLock()) if (_pConnection)
{ {
PQfinish(_pConnection); PQfinish(_pConnection);