mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 05:47:14 +02:00
fixed reading and double print in client
This commit is contained in:
@ -75,15 +75,12 @@ void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
|
||||
char mess[MAX_STR_LENGTH]{};
|
||||
// get error message
|
||||
read(mess, sizeof(mess));
|
||||
FILE_LOG(logERROR) << socketType << " returned error: " << mess;
|
||||
std::cout << "\n"; // needed to reset the color.
|
||||
|
||||
// Do we need to know hostname here?
|
||||
// In that case save it???
|
||||
if (socketType == "Receiver") {
|
||||
throw ReceiverError(mess);
|
||||
throw ReceiverError("Receiver returned: " + std::string(mess));
|
||||
} else if (socketType == "Detector") {
|
||||
throw DetectorError(mess);
|
||||
throw DetectorError("Detector returned: " + std::string(mess));
|
||||
} else {
|
||||
throw GuiError(mess);
|
||||
}
|
||||
|
Reference in New Issue
Block a user