1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

set ethernet client to NULL when done with it

This commit is contained in:
Harald Barth 2024-01-28 01:47:05 +01:00
parent dd5ab6c7fa
commit 60fb30c0a7

View File

@ -242,8 +242,10 @@ void EthernetInterface::loop2() {
if (!clients[socket].connected()) { // stop any clients which disconnect
CommandDistributor::forget(socket);
clients[socket].stop();
clients[socket]=NULL;
//if (Diag::ETHERNET)
DIAG(F("Ethernet: disconnect %d "), socket);
return; // Trick: So that we do not continue in this loop with client that is NULL
}
int available=clients[socket].available();