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:
parent
dd5ab6c7fa
commit
60fb30c0a7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user