some unsuccessfull fixes for picloud
This commit is contained in:
@@ -45,14 +45,10 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
|
||||
PICloudClient::~PICloudClient() {
|
||||
//piCoutObj << "~PICloudClient()";
|
||||
|
||||
stopAndWait();
|
||||
//piCoutObj << "~PICloudClient() closed";
|
||||
internalDisconnect();
|
||||
// stop(false);
|
||||
close();
|
||||
is_deleted = true;
|
||||
internalDisconnect();
|
||||
//piCoutObj << "~PICloudClient() done";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ PICloudServer::PICloudServer(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
CONNECTL(ð, 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;
|
||||
|
||||
@@ -28,7 +28,7 @@ PIString DispatcherClient::address() {
|
||||
|
||||
void DispatcherClient::close() {
|
||||
eth->softStopThreadedRead();
|
||||
eth->close();
|
||||
eth->interrupt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user