From 0dde5826954b94541c6a896ca65ca8fb80476e04 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 8 May 2024 15:06:51 +0200 Subject: [PATCH] killed gameThread --- TCPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 33bd42e..9506da3 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -129,8 +129,6 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) this->stopEmergency = true; - this->gameThread.~thread(); - std::vector args = TCPUtils::split(tokens[3], ","); if (!handleEmergencyFlag) { @@ -929,6 +927,8 @@ void TCPServer::handleEmergency(int distance, double angle) { awaitRobotIdle();*/ } + this->gameThread.~thread(); + this->gameStarted = false; this->gameThread = std::thread([this]() { this->startGame(); });