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

keeping up to date - cleaning

This commit is contained in:
travis-farmer 2023-11-02 14:00:02 -04:00
parent dfa798c149
commit 701bc0a837
No known key found for this signature in database
GPG Key ID: 0BC296791D14CB35

View File

@ -284,8 +284,8 @@ void WifiNINA::loop() {
}
}
WiFiClient client = server->available();
if (client) {
///while (!client) {
if (client == true) {
///while (client.available() == true) {
for (clientId=0; clientId<clients.size(); clientId++){
if (clients[clientId].recycle(client)) {
ip = client.remoteIP();
@ -294,9 +294,9 @@ void WifiNINA::loop() {
}
}
if (clientId>=clients.size()) {
auto nc=new NetworkClient(client);
NetworkClient* nc=new NetworkClient(client);
clients.push_back(*nc);
delete nc;
//delete nc;
ip = client.remoteIP();
DIAG(F("New client %d, %d.%d.%d.%d"), clientId, ip[0], ip[1], ip[2], ip[3]);
}