check for giving an error in gui if cannot connect to hostname

This commit is contained in:
Dhanya Maliakal
2016-10-18 15:03:44 +02:00
parent 1e9ebc6f37
commit ca89835035
2 changed files with 2 additions and 14 deletions

View File

@ -1246,6 +1246,7 @@ string slsDetector::checkOnline() {
delete controlSocket;
controlSocket=NULL;
retval = string(thisDetector->hostname);
thisDetector->onlineFlag=OFFLINE_FLAG;
#ifdef VERBOSE
std::cout<< "offline!" << std::endl;
#endif
@ -1253,6 +1254,7 @@ string slsDetector::checkOnline() {
thisDetector->onlineFlag=ONLINE_FLAG;
controlSocket->SetTimeOut(100);
disconnectControl();
thisDetector->onlineFlag=ONLINE_FLAG;
#ifdef VERBOSE
std::cout<< "online!" << std::endl;
#endif