diff Framework/PostgreSQL/PostgreSQLDatabase.cpp @ 46:6a574d810b98

Compatibility with MySQL 8.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Jul 2018 12:27:40 +0200
parents 2fb9cd42af14
children 318c1ccb787c
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLDatabase.cpp	Tue Jul 17 08:50:53 2018 +0200
+++ b/Framework/PostgreSQL/PostgreSQLDatabase.cpp	Wed Jul 18 12:27:40 2018 +0200
@@ -68,6 +68,19 @@
     }
   }
 
+
+  PostgreSQLDatabase::~PostgreSQLDatabase()
+  {
+    try
+    {
+      Close();
+    }
+    catch (Orthanc::OrthancException&)
+    {
+      // Ignore possible exceptions due to connection loss
+    }
+  }
+  
   
   void PostgreSQLDatabase::Open()
   {