mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-07 11:58:20 +02:00
Better error message on socket (#1477)
Build and Deploy on local RHEL9 / build (push) Successful in 2m1s
Build on RHEL9 docker image / build (push) Successful in 4m31s
Build and Deploy on local RHEL8 / build (push) Successful in 5m6s
Build on RHEL8 docker image / build (push) Successful in 5m34s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m38s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m6s
Build and Deploy on local RHEL9 / build (push) Successful in 2m1s
Build on RHEL9 docker image / build (push) Successful in 4m31s
Build and Deploy on local RHEL8 / build (push) Successful in 5m6s
Build on RHEL8 docker image / build (push) Successful in 5m34s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m38s
Run Simulator Tests on local RHEL8 / build (push) Successful in 22m6s
* checking errno * improved socket error message * improved message * decode error code * format * clearer msg * report write errors, handle SIGPIPE * retry and cleaned up timeout * removed read/write in DataSocket
This commit is contained in:
@@ -10,16 +10,16 @@ namespace sls {
|
||||
int ServerInterface::sendResult(int ret, void *retval, int retvalSize,
|
||||
char *mess) {
|
||||
|
||||
write(&ret, sizeof(ret));
|
||||
Send(&ret, sizeof(ret));
|
||||
if (ret == defs::FAIL) {
|
||||
if (mess != nullptr) {
|
||||
write(mess, MAX_STR_LENGTH);
|
||||
Send(mess, MAX_STR_LENGTH);
|
||||
} else {
|
||||
LOG(logERROR) << "No error message provided for this "
|
||||
"failure. Will mess up TCP\n";
|
||||
}
|
||||
} else {
|
||||
write(retval, retvalSize);
|
||||
Send(retval, retvalSize);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user