From 4f2d2ca746b23329065be95cb7bfcd890e5bac1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 20:09:51 +0000 Subject: [PATCH] fix: log udp client send failures when disconnected Agent-Logs-Url: https://github.com/PepperDash/Essentials/sessions/761a7a78-c51f-474b-9000-baa9a232c0d0 Co-authored-by: jonnyarndt <21110580+jonnyarndt@users.noreply.github.com> --- src/PepperDash.Core/Comm/GenericUdpClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PepperDash.Core/Comm/GenericUdpClient.cs b/src/PepperDash.Core/Comm/GenericUdpClient.cs index 3d93bada..2c2d0f1c 100644 --- a/src/PepperDash.Core/Comm/GenericUdpClient.cs +++ b/src/PepperDash.Core/Comm/GenericUdpClient.cs @@ -336,7 +336,10 @@ namespace PepperDash.Core var udpClient = client; if (!IsConnected || udpClient == null) + { + Debug.Console(1, Debug.ErrorLogLevel.Warning, "GenericUdpClient '{0}': Cannot send bytes because the client is not connected", Key); return; + } udpClient.Send(bytes, bytes.Length); } @@ -440,4 +443,4 @@ namespace PepperDash.Core } } } -} \ No newline at end of file +}