Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fix UdpClientProtocolTest instability by enabling SO_REUSEADDR (#2378)

Koenbd118b324fd0
diff --git a/agent/src/main/java/org/openremote/agent/protocol/udp/UDPIOClient.java b/agent/src/main/java/org/openremote/agent/protocol/udp/UDPIOClient.java
index 06f9a092d..0e60f3109 100644
--- a/agent/src/main/java/org/openremote/agent/protocol/udp/UDPIOClient.java
+++ b/agent/src/main/java/org/openremote/agent/protocol/udp/UDPIOClient.java
@@ -113,5 +113,6 @@ public class UDPIOClient<T> extends AbstractNettyIOClient<T, InetSocketAddress>
protected void configureChannel() {
super.configureChannel();
bootstrap.option(ChannelOption.SO_BROADCAST, true);
+ bootstrap.option(ChannelOption.SO_REUSEADDR, true);
}
}