From 76759998e5c2454b4a12b49cbf9160aeaa4f89c8 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 24 Aug 2016 15:15:48 -0600 Subject: [PATCH] Use configuration property for ConfigWatch waitTime --- .../org/springframework/cloud/consul/config/ConfigWatch.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConfigWatch.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConfigWatch.java index a5109761..a50c4e38 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConfigWatch.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConfigWatch.java @@ -80,7 +80,9 @@ public class ConfigWatch implements Closeable, ApplicationEventPublisherAware { currentIndex = -1L; } - Response> response = this.consul.getKVValues(context, new QueryParams(2, currentIndex)); + Response> response = this.consul.getKVValues(context, + new QueryParams(this.properties.getWatch().getWaitTime(), + currentIndex)); Long newIndex = response.getConsulIndex();