1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 08:36:14 +01:00

allows client, but immidiatly drops client

This commit is contained in:
travis-farmer 2023-11-03 07:48:12 -04:00
parent 05db1bdd90
commit d95d9c193e
No known key found for this signature in database
GPG Key ID: 0BC296791D14CB35

View File

@ -378,7 +378,7 @@ void WifiNINA::checkForNewClient() {
for (byte clientId=0; clientId<MAX_CLIENTS; clientId++){ for (byte clientId=0; clientId<MAX_CLIENTS; clientId++){
if (!clients[clientId]) { if (!clients[clientId]) {
clients[clientId]=&newClient; // use this slot clients[clientId]=&newClient; // use this slot
// DIAG("New client connected to slot %d,clientId); DIAG(F("New client connected to slot %d"),clientId);
return; return;
} }
} }
@ -390,7 +390,7 @@ void WifiNINA::checkForLostClients() {
if(c && !c->connected()) { if(c && !c->connected()) {
DIAG(F("Remove client %d"), clientId); DIAG(F("Remove client %d"), clientId);
CommandDistributor::forget(clientId); CommandDistributor::forget(clientId);
delete c; // we have now finished with this client //delete c; // we have now finished with this client
clients[clientId]=nullptr; clients[clientId]=nullptr;
} }
} }