From 6a87b9e107e03d3dd3ba479af3cdfdf4c62f83e2 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 7 Oct 2022 15:47:59 +0200 Subject: [PATCH] Clean up socket on error --- src/utils/TcpReceiver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/TcpReceiver.cpp b/src/utils/TcpReceiver.cpp index 398416e..eff6fe2 100644 --- a/src/utils/TcpReceiver.cpp +++ b/src/utils/TcpReceiver.cpp @@ -102,6 +102,7 @@ void TcpReceiver::executeThread() { } else if (!exitRequested) { if (errno != EBUSY) { DEBUG_FUNCTION_LINE_WARN("Accept failed %d", errno); + cleanupSocket(); } OSSleepTicks(OSMillisecondsToTicks(10)); }