diff --git a/proof/proof/inc/TProofServ.h b/proof/proof/inc/TProofServ.h index d726fe359b347bdcd0b8aadf0cdaf1b6c9776141..0a12e7ab9708ac36eaefa0cc95b9075faedfad5e 100644 --- a/proof/proof/inc/TProofServ.h +++ b/proof/proof/inc/TProofServ.h @@ -429,9 +429,10 @@ public: class TShutdownTimer : public TTimer { private: TProofServ *fProofServ; + Int_t fTimeout; public: - TShutdownTimer(TProofServ *p, Int_t delay) : TTimer(delay, kFALSE), fProofServ(p) { } + TShutdownTimer(TProofServ *p, Int_t delay); Bool_t Notify(); }; diff --git a/proof/proof/src/TProofServ.cxx b/proof/proof/src/TProofServ.cxx index fe312083ae043a390c4d4ebb875b2f4afad4d2f1..d8c0e00eacb55544b46fe714b1f3cf8f49ff1879 100644 --- a/proof/proof/src/TProofServ.cxx +++ b/proof/proof/src/TProofServ.cxx @@ -395,6 +395,17 @@ TProofServLogHandlerGuard::~TProofServLogHandlerGuard() } //--- Special timer to control delayed shutdowns ----------------------------// +//______________________________________________________________________________ +TShutdownTimer::TShutdownTimer(TProofServ *p, Int_t delay) + : TTimer(delay, kFALSE), fProofServ(p) +{ + // Construtor + + fTimeout = gEnv->GetValue("ProofServ.ShutdownTimeout", 20); + // Backward compaitibility: until 5.32 the variable was called ProofServ.ShutdonwTimeout + fTimeout = gEnv->GetValue("ProofServ.ShutdonwTimeout", fTimeout); +} + //______________________________________________________________________________ Bool_t TShutdownTimer::Notify() { @@ -402,7 +413,7 @@ Bool_t TShutdownTimer::Notify() // process will be aborted. if (gDebug > 0) - Info ("Notify","checking activity on the input socket"); + Printf("TShutdownTimer::Notify: checking activity on the input socket"); // Check activity on the socket TSocket *xs = 0; @@ -411,22 +422,18 @@ Bool_t TShutdownTimer::Notify() TTimeStamp ts = xs->GetLastUsage(); Long_t dt = (Long_t)(now.GetSec() - ts.GetSec()) * 1000 + (Long_t)(now.GetNanoSec() - ts.GetNanoSec()) / 1000000 ; - Int_t to = gEnv->GetValue("ProofServ.ShutdownTimeout", 20); - // Backward compaitibility: until 5.32 the variable was called ProofServ.ShutdonwTimeout - to = gEnv->GetValue("ProofServ.ShutdonwTimeout", to); - if (dt > to * 60000) { + if (dt > fTimeout * 60000) { Printf("TShutdownTimer::Notify: input socket: %p: did not show any activity" - " during the last %d mins: aborting", xs, to); + " during the last %d mins: aborting", xs, fTimeout); // At this point we lost our controller: we need to abort to avoid // hidden timeouts or loops gSystem->Abort(); } else { if (gDebug > 0) - Info("Notify", "input socket: %p: show activity" - " %ld secs ago", xs, dt / 60000); + Printf("TShutdownTimer::Notify: input socket: %p: show activity" + " %ld secs ago", xs, dt / 60000); } } - Start(-1, kFALSE); return kTRUE; }