Fixes user provided timeouts.
New Atomix releases use null timeout instead of timeout with duration 0
when it is requested to compute the timeout.
Change-Id: I8f7ec8a65a1b5f3aca3b59894bfc9cee868f8b57
diff --git a/core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterCommunicationService.java b/core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterCommunicationService.java
index bb17cbc..e8cf7d3 100644
--- a/core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterCommunicationService.java
+++ b/core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterCommunicationService.java
@@ -111,7 +111,7 @@
Function<M, byte[]> encoder,
Function<byte[], R> decoder,
NodeId toNodeId) {
- return sendAndReceive(message, subject, encoder, decoder, toNodeId, Duration.ZERO);
+ return sendAndReceive(message, subject, encoder, decoder, toNodeId, null);
}
/**
diff --git a/core/api/src/main/java/org/onosproject/store/cluster/messaging/MessagingService.java b/core/api/src/main/java/org/onosproject/store/cluster/messaging/MessagingService.java
index 8927e51..ebbe615 100644
--- a/core/api/src/main/java/org/onosproject/store/cluster/messaging/MessagingService.java
+++ b/core/api/src/main/java/org/onosproject/store/cluster/messaging/MessagingService.java
@@ -46,7 +46,7 @@
* @return a response future
*/
default CompletableFuture<byte[]> sendAndReceive(Endpoint ep, String type, byte[] payload) {
- return sendAndReceive(ep, type, payload, Duration.ZERO, MoreExecutors.directExecutor());
+ return sendAndReceive(ep, type, payload, null, MoreExecutors.directExecutor());
}
/**
@@ -58,7 +58,7 @@
* @return a response future
*/
default CompletableFuture<byte[]> sendAndReceive(Endpoint ep, String type, byte[] payload, Executor executor) {
- return sendAndReceive(ep, type, payload, Duration.ZERO, executor);
+ return sendAndReceive(ep, type, payload, null, executor);
}
/**