cloud! finally fixed bug!
This commit is contained in:
@@ -75,7 +75,7 @@ void DispatcherServer::cleanClients() {
|
||||
c_servers.remove(c->serverUUID());
|
||||
index_c_servers.remove(c->getConnection());
|
||||
rmrf_clients << const_cast<DispatcherClient *>(c->getConnection());
|
||||
delete c;
|
||||
rmrf_servers << c;
|
||||
}
|
||||
}
|
||||
for (auto c: rm_clients) {
|
||||
@@ -223,10 +223,10 @@ void DispatcherServer::disconnectClient(DispatcherClient * client) {
|
||||
|
||||
|
||||
void DispatcherServer::newConnection(PIEthernet * cl) {
|
||||
piCout << "DispatcherServer::newConnection" << (void *)cl;
|
||||
// piCout << "DispatcherServer::newConnection" << (void *)cl;
|
||||
PIMutexLocker locker(map_mutex);
|
||||
if (clients.size() >= max_connections) {
|
||||
piCout << "DispatcherServer::newConnection overflow" << (void *)cl;
|
||||
// piCout << "DispatcherServer::newConnection overflow" << (void *)cl;
|
||||
delete cl;
|
||||
return;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ void DispatcherServer::newConnection(PIEthernet * cl) {
|
||||
CloudServer * cs = c_servers.value(sname, nullptr);
|
||||
if (cs) {
|
||||
rm_clients << c;
|
||||
piCoutObj << "dublicate Server ->" << sname.toHex();
|
||||
piCoutObj << "duplicate Server ->" << sname.toHex();
|
||||
} else {
|
||||
piCoutObj << "add new Server ->" << sname.toHex();
|
||||
CloudServer * cs = new CloudServer(c, sname);
|
||||
@@ -262,5 +262,5 @@ void DispatcherServer::newConnection(PIEthernet * cl) {
|
||||
// piCoutObj << "add client" << client;
|
||||
clients.push_back(client);
|
||||
client->start();
|
||||
piCout << "DispatcherServer::newConnection started" << (void *)cl;
|
||||
// piCout << "DispatcherServer::newConnection started" << (void *)cl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user