changeset 476:0f11a1f67dff

ODBC: Now detecting communication link failure with the DB and retrying to connect
author Alain Mazy <am@osimis.io>
date Fri, 01 Mar 2024 14:42:40 +0100
parents 97c709e400ec
children 88f72b32c1bc
files Framework/Odbc/OdbcStatement.cpp Odbc/NEWS
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Odbc/OdbcStatement.cpp	Wed Feb 14 15:07:44 2024 +0100
+++ b/Framework/Odbc/OdbcStatement.cpp	Fri Mar 01 14:42:40 2024 +0100
@@ -82,6 +82,11 @@
           throw Orthanc::OrthancException(Orthanc::ErrorCode_Database, "Collision between multiple writers");
 #endif
         }
+        else if (state == "08S01")
+        {
+          throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseUnavailable);
+        }
+
       }
       else
       {
--- a/Odbc/NEWS	Wed Feb 14 15:07:44 2024 +0100
+++ b/Odbc/NEWS	Fri Mar 01 14:42:40 2024 +0100
@@ -5,6 +5,7 @@
 * Added support for labels
 * Compatibility with Orthanc SDK 1.12.0 (communications between the
   Orthanc core and the database plugin using Google Protocol Buffers)
+* Now detecting communication link failure with the DB and retrying to connect.
 
 
 Release 1.1 (2021-12-06)