some unsuccessfull fixes for picloud

This commit is contained in:
Бычков Андрей
2022-11-07 17:32:10 +03:00
parent f08a07cab0
commit 93a1bf4f6d
3 changed files with 4 additions and 8 deletions

View File

@@ -30,6 +30,7 @@ PICloudServer::PICloudServer(const PIString & path, PIIODevice::DeviceMode mode)
CONNECTL(&eth, disconnected, [this](bool){
piCoutObj << "disconnected";
eth.softStopThreadedRead();
eth.interrupt();
opened_ = false;
ping_timer.stop(false);
piMSleep(100);
@@ -129,8 +130,8 @@ PICloudServer::Client::~Client() {
is_connected = false;
cond_buff.notifyOne();
}
stopAndWait();
close();
stop();
}
@@ -140,7 +141,6 @@ bool PICloudServer::Client::openDevice() {
bool PICloudServer::Client::closeDevice() {
softStopThreadedRead();
if (is_connected) {
server->clientDisconnect(client_id);
is_connected = false;