PIIODevice threaded read refactoring
This commit is contained in:
@@ -33,7 +33,7 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
if (is_deleted) return;
|
||||
bool need_disconn = is_connected;
|
||||
//piCoutObj << "eth disconnected";
|
||||
static_cast<PIThread*>(ð)->stop();
|
||||
eth.stopThreadedRead();
|
||||
opened_ = false;
|
||||
internalDisconnect();
|
||||
if (need_disconn)
|
||||
@@ -45,7 +45,7 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
|
||||
PICloudClient::~PICloudClient() {
|
||||
//piCoutObj << "~PICloudClient()";
|
||||
PIThread::stop();
|
||||
softStopThreadedRead();
|
||||
//eth.close();
|
||||
//if (is_connected) disconnected();
|
||||
close();
|
||||
@@ -155,7 +155,7 @@ void PICloudClient::_readed(PIByteArray & ba) {
|
||||
}
|
||||
break;
|
||||
case PICloud::TCP::Disconnect:
|
||||
static_cast<PIThread*>(ð)->stop();
|
||||
eth.stopThreadedRead();
|
||||
opened_ = false;
|
||||
eth.close();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user