mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
checkonline, checkrecieveronline, retval has offline hostnames, online flag should be set no matter what the outcome
This commit is contained in:
parent
5235a87e93
commit
be33102164
@ -748,10 +748,10 @@ std::string slsDetector::checkOnline() {
|
||||
//Need both control and stop socket to work!
|
||||
auto client = sls::ClientSocket(false, detector_shm()->hostname, detector_shm()->controlPort);
|
||||
auto stop = sls::ClientSocket(false, detector_shm()->hostname, detector_shm()->stopPort);
|
||||
retval = detector_shm()->hostname;
|
||||
detector_shm()->onlineFlag = ONLINE_FLAG;
|
||||
} catch (...) {
|
||||
//try catch should not be used for control but we should also not call this function
|
||||
detector_shm()->onlineFlag = OFFLINE_FLAG;
|
||||
retval = detector_shm()->hostname;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@ -4051,8 +4051,10 @@ std::string slsDetector::checkReceiverOnline() {
|
||||
std::string retval;
|
||||
try {
|
||||
auto receiver = sls::ClientSocket(true, detector_shm()->receiver_hostname, detector_shm()->receiverTCPPort);
|
||||
retval = detector_shm()->receiver_hostname;
|
||||
detector_shm()->receiverOnlineFlag = ONLINE_FLAG;
|
||||
} catch (...) {
|
||||
detector_shm()->receiverOnlineFlag = OFFLINE_FLAG;
|
||||
retval = detector_shm()->receiver_hostname;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user