kill the thread

This commit is contained in:
ackimixs
2024-05-08 16:05:08 +02:00
parent 5e5956f5ba
commit d98b1e7102

View File

@@ -793,6 +793,14 @@ void TCPServer::awaitRobotIdle() {
usleep(50'000);
this->sendToClient("strat;arduino;get state;1\n", this->arduinoSocket);
timeout++;
if (stopEmergency) {
try {
std::terminate();
}
catch (const std::exception& ex) {
std::cout << ex.what() << std::endl;
}
}
if (timeout > 80) {
this->broadcastMessage("strat;arduino;clear;1");
break;