diff --git a/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/CommunicationManager.java b/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/CommunicationManager.java index 4028c425e26..c8cdee364b4 100644 --- a/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/CommunicationManager.java +++ b/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/CommunicationManager.java @@ -200,7 +200,12 @@ public class CommunicationManager { socket.setReuseAddress(true); while (!stopped) { DatagramPacket packet = new DatagramPacket(buffer, buffer.length); - socket.receive(packet); + if (!socket.isClosed()) { + socket.receive(packet); + } else { + logger.warn("Socket was unexpectedly closed"); + break; + } if (stopped) { break; }