Ping function added to check connection to DAQ/DCS/HLT servers.
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Dec 2008 09:43:58 +0000 (09:43 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Dec 2008 09:43:58 +0000 (09:43 +0000)
SHUTTLE/AliShuttle.cxx

index a9e065e..a47d63f 100644 (file)
@@ -2483,7 +2483,12 @@ Bool_t AliShuttle::Connect(Int_t system)
        //
 
        // check connection: if already connected return
-       if(fServer[system] && fServer[system]->IsConnected()) return kTRUE;
+       if(fServer[system] && fServer[system]->IsConnected()) {
+               // ping the server --> automatic reconnection should occur if it was broken but the
+               // server is still alive
+               fServer[system]->Ping();
+               return kTRUE;
+       }
 
        TString dbHost, dbUser, dbPass, dbName;
 
@@ -3156,7 +3161,7 @@ Bool_t AliShuttle::SendMail(EMailTarget target, Int_t system)
 
        if (target == kDCSEMail || target == kFXSEMail) {
                if (!fFirstProcessing)
-               return kTRUE;
+                       return kTRUE;
        }
 
        Int_t runMode = (Int_t)fConfig->GetRunMode();
@@ -3333,7 +3338,6 @@ Bool_t AliShuttle::SendMail(EMailTarget target, Int_t system)
 
        return result == 0;
 }
-
 //______________________________________________________________________________________________
 const char* AliShuttle::GetRunType()
 {
@@ -3547,4 +3551,3 @@ UInt_t AliShuttle::GetEndTimeDCSQuery()
        return GetCurrentEndTime()+fConfig->GetDCSQueryOffset();
 }
 
-