some unsuccessfull fixes for picloud
This commit is contained in:
@@ -45,14 +45,10 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
|
|||||||
|
|
||||||
PICloudClient::~PICloudClient() {
|
PICloudClient::~PICloudClient() {
|
||||||
//piCoutObj << "~PICloudClient()";
|
//piCoutObj << "~PICloudClient()";
|
||||||
|
|
||||||
stopAndWait();
|
stopAndWait();
|
||||||
//piCoutObj << "~PICloudClient() closed";
|
close();
|
||||||
internalDisconnect();
|
|
||||||
// stop(false);
|
|
||||||
is_deleted = true;
|
is_deleted = true;
|
||||||
internalDisconnect();
|
internalDisconnect();
|
||||||
//piCoutObj << "~PICloudClient() done";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ PICloudServer::PICloudServer(const PIString & path, PIIODevice::DeviceMode mode)
|
|||||||
CONNECTL(ð, disconnected, [this](bool){
|
CONNECTL(ð, disconnected, [this](bool){
|
||||||
piCoutObj << "disconnected";
|
piCoutObj << "disconnected";
|
||||||
eth.softStopThreadedRead();
|
eth.softStopThreadedRead();
|
||||||
|
eth.interrupt();
|
||||||
opened_ = false;
|
opened_ = false;
|
||||||
ping_timer.stop(false);
|
ping_timer.stop(false);
|
||||||
piMSleep(100);
|
piMSleep(100);
|
||||||
@@ -129,8 +130,8 @@ PICloudServer::Client::~Client() {
|
|||||||
is_connected = false;
|
is_connected = false;
|
||||||
cond_buff.notifyOne();
|
cond_buff.notifyOne();
|
||||||
}
|
}
|
||||||
|
stopAndWait();
|
||||||
close();
|
close();
|
||||||
stop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -140,7 +141,6 @@ bool PICloudServer::Client::openDevice() {
|
|||||||
|
|
||||||
|
|
||||||
bool PICloudServer::Client::closeDevice() {
|
bool PICloudServer::Client::closeDevice() {
|
||||||
softStopThreadedRead();
|
|
||||||
if (is_connected) {
|
if (is_connected) {
|
||||||
server->clientDisconnect(client_id);
|
server->clientDisconnect(client_id);
|
||||||
is_connected = false;
|
is_connected = false;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ PIString DispatcherClient::address() {
|
|||||||
|
|
||||||
void DispatcherClient::close() {
|
void DispatcherClient::close() {
|
||||||
eth->softStopThreadedRead();
|
eth->softStopThreadedRead();
|
||||||
eth->close();
|
eth->interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user