FIX: fixed some issues with stopping the client
This commit is contained in:
@@ -41,14 +41,16 @@ namespace DirectCommunication
|
||||
void DirectCommunicationClient::disconnect()
|
||||
{
|
||||
sendMessage("CLOSE");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
useHandl_ = false;
|
||||
isConnected = false;
|
||||
MessageHandle_ = nullptr;
|
||||
stopWorker_ = true;
|
||||
Worker_.join();
|
||||
|
||||
socket_.close();
|
||||
isConnected = false;
|
||||
context_.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user