FIX:fixed some issues in the tcp client

This commit is contained in:
Henry Winkel
2023-08-09 15:56:35 +02:00
parent 3a195b519c
commit 27987081d7
2 changed files with 3 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ namespace DirectCommunication
socket_.connect("tcp://"+serverAddress_+":"+std::to_string(port_));
socket_.set(zmq::sockopt::rcvtimeo,100);
socket_.set(zmq::sockopt::sndtimeo,500);
Worker_ = std::thread(&DirectCommunicationClient::workerFunc_,this);
stopWorker_ = false;
@@ -74,7 +75,7 @@ namespace DirectCommunication
if (recv > 0)
{
isConnected = true;
if (msg.to_string() == "CLOSE")
{
isConnected = false;