FIX: fixed the tcp client

This commit is contained in:
Henry Winkel
2023-07-05 18:20:37 +02:00
parent 7fa17e0397
commit 9ffa95877b
2 changed files with 7 additions and 2 deletions

View File

@@ -41,7 +41,9 @@ namespace DirectCommunication
zmq::message_t zmqMsg(msg.begin(),msg.end());
socket_.send(zmqMsg,zmq::send_flags::dontwait);
if (isConnected == true) {
socket_.send(zmqMsg,zmq::send_flags::dontwait);
}
}
@@ -70,7 +72,7 @@ namespace DirectCommunication
if (msg.to_string() == "CLOSE")
{
isConnected = false;
socket_.disconnect("tcp://"+serverAddress_+":"+std::to_string(port_));
}else