Browse Source

bug fix: ethernet cli dropping connection after each command

pull/1983/head
Ryan Gregg 4 months ago
parent
commit
0ffe1c2cb9
  1. 2
      src/helpers/nrf52/EthernetCLI.h

2
src/helpers/nrf52/EthernetCLI.h

@ -102,6 +102,8 @@ static bool ethernet_handle_command(const char* command, char* reply) {
static void ethernet_check_client() {
auto newClient = ethernet_server.available();
if (newClient) {
// Only replace if this is actually a different client
if (newClient == ethernet_client && ethernet_client.connected()) return;
if (ethernet_client) ethernet_client.stop();
ethernet_client = newClient;
IPAddress ip = ethernet_client.remoteIP();

Loading…
Cancel
Save