From 0ffe1c2cb9fa9fcb14b8c577dee39a04176eff5c Mon Sep 17 00:00:00 2001 From: Ryan Gregg Date: Sat, 21 Mar 2026 19:28:44 -0700 Subject: [PATCH] bug fix: ethernet cli dropping connection after each command --- src/helpers/nrf52/EthernetCLI.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/nrf52/EthernetCLI.h b/src/helpers/nrf52/EthernetCLI.h index 9ccc34f4..508d3aa6 100644 --- a/src/helpers/nrf52/EthernetCLI.h +++ b/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();