Skip to content

armgit / core

Public Imported from GitHub
0

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

UdpClientProtocol bug fixes

Rich Turner73e580beb639
diff --git a/agent/src/main/java/org/openremote/agent/protocol/udp/UdpClientProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/udp/UdpClientProtocol.java
index 035c4ea21..9d528f124 100644
--- a/agent/src/main/java/org/openremote/agent/protocol/udp/UdpClientProtocol.java
+++ b/agent/src/main/java/org/openremote/agent/protocol/udp/UdpClientProtocol.java
@@ -173,7 +173,7 @@ public class UdpClientProtocol extends AbstractProtocol {
client.sendMessage(str);
- responseMonitor = executorService.scheduleWithFixedDelay(failureAction, 0, timeoutMillis);
+ responseMonitor = executorService.scheduleWithFixedDelay(failureAction, timeoutMillis, timeoutMillis);
}
}
@@ -400,7 +400,7 @@ public class UdpClientProtocol extends AbstractProtocol {
return;
}
- final String writeValue = Values.getMetaItemValueOrThrow(attribute, META_ATTRIBUTE_WRITE_VALUE, true, true)
+ final String writeValue = Values.getMetaItemValueOrThrow(attribute, META_ATTRIBUTE_WRITE_VALUE, false, true)
.map(Object::toString).orElse(null);
final Integer pollingMillis = Values.getMetaItemValueOrThrow(attribute, META_POLLING_MILLIS, false, true)
@@ -529,7 +529,7 @@ public class UdpClientProtocol extends AbstractProtocol {
if (!TextUtil.isNullOrEmpty(writeValue)) {
if (str.isEmpty()) {
str = writeValue;
- } else {
+ } else if (writeValue.contains(DYNAMIC_VALUE_PLACEHOLDER)) {
str = writeValue.replaceAll(DYNAMIC_VALUE_PLACEHOLDER_REGEXP, str);
}
}