cloud fixes ...

This commit is contained in:
2024-03-18 10:45:57 +03:00
parent 576d9c79be
commit dd6d91ac1d
3 changed files with 8 additions and 0 deletions

View File

@@ -65,6 +65,11 @@ double CloudServer::lastPing() {
}
void CloudServer::close() {
server->close();
}
void CloudServer::printStatus() {
PIMutexLocker locker(mutex_clients);
piCout << " "

View File

@@ -17,6 +17,7 @@ public:
EVENT_HANDLER0(void, printStatus);
const DispatcherClient * getConnection() const { return server; }
double lastPing();
void close();
private:
DispatcherClient * server;

View File

@@ -68,6 +68,7 @@ void DispatcherServer::cleanClients() {
csc->close();
if (!rmrf_clients.contains(csc)) rmrf_clients << csc;
}
c->close();
c_servers.remove(c->serverUUID());
index_c_servers.remove(c->getConnection());
rmrf_clients << const_cast<DispatcherClient *>(c->getConnection());
@@ -203,6 +204,7 @@ void DispatcherServer::disconnectClient(DispatcherClient * client) {
csc->close();
if (!rmrf_clients.contains(csc)) rmrf_clients << csc;
}
cs->close();
c_servers.remove(cs->serverUUID());
index_c_servers.remove(client);
delete cs;