mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-13 23:18:40 +01:00
fixed validation in network_utils, added a tests to throw for port 65535 in test mode (option on for sls_use_tests), multi:parent process checks child process exit status to send sigint to others
This commit is contained in:
@@ -254,7 +254,6 @@ int main(int argc, char *argv[]) {
|
||||
std::cerr << "Child " << childPid << " failed\n";
|
||||
kill(0, SIGINT); // signal other children to exit
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::cout << "Goodbye!\n";
|
||||
|
||||
@@ -29,6 +29,11 @@ Receiver::~Receiver() = default;
|
||||
|
||||
Receiver::Receiver(uint16_t port) {
|
||||
validatePortNumber(port);
|
||||
#ifdef SLS_USE_TESTS
|
||||
if (port == 65535) {
|
||||
throw sls::RuntimeError("Throwing for testing purposes. ");
|
||||
}
|
||||
#endif
|
||||
tcpipInterface = make_unique<ClientInterface>(port);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user