diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index a5ec53775..3a3a3be10 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -1321,6 +1321,26 @@ string slsDetector::checkOnline() { disconnectControl(); #ifdef VERBOSE std::cout<< "online!" << std::endl; +#endif + } + } + //still cannot connect to socket, controlSocket=0 + if(stopSocket){ + if (connectStop() == FAIL) { + stopSocket->SetTimeOut(5); + thisDetector->onlineFlag=OFFLINE_FLAG; + delete stopSocket; + stopSocket=NULL; + retval = string(thisDetector->hostname); +#ifdef VERBOSE + std::cout<< "stop offline!" << std::endl; +#endif + } else { + thisDetector->onlineFlag=ONLINE_FLAG; + stopSocket->SetTimeOut(100); + disconnectStop(); +#ifdef VERBOSE + std::cout<< "stop online!" << std::endl; #endif } }