map and cloud fix, add cloud debug
This commit is contained in:
@@ -34,12 +34,12 @@ PICloudServer::PICloudServer(const PIString & path, PIIODevice::DeviceMode mode)
|
||||
opened_ = true;
|
||||
cvar.notifyOne();
|
||||
open_mutex.unlock();
|
||||
// piCoutObj << "connected";
|
||||
piCoutObj << "connected";
|
||||
tcp.sendStart();
|
||||
});
|
||||
CONNECTL(ð, disconnected, [this](bool) {
|
||||
if (is_deleted) return;
|
||||
// piCoutObj << "disconnected";
|
||||
piCoutObj << "disconnected";
|
||||
clients_mutex.lock();
|
||||
for (auto c: clients_) {
|
||||
c->is_connected = false;
|
||||
@@ -89,7 +89,7 @@ PIVector<PICloudServer::Client *> PICloudServer::clients() const {
|
||||
|
||||
|
||||
bool PICloudServer::openDevice() {
|
||||
// piCout << "PICloudServer open device" << path();
|
||||
piCoutObj << "open device" << path();
|
||||
if (is_deleted) return false;
|
||||
bool op = eth.connect(PINetworkAddress::resolve(path()), false);
|
||||
if (op) {
|
||||
@@ -293,12 +293,6 @@ void PICloudServer::clientDeleted(PIObject * o) {
|
||||
clients_mutex.lock();
|
||||
clients_.removeOne(c);
|
||||
removed_clients_.removeAll(c);
|
||||
auto it = index_clients.makeIterator();
|
||||
while (it.next()) {
|
||||
if (it.value() == c) {
|
||||
index_clients.remove(it.key());
|
||||
break;
|
||||
}
|
||||
}
|
||||
index_clients.removeWhere([c](uint, Client * v) { return v == c; });
|
||||
clients_mutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user