From bf5ecf8a49a5c3053e52437b0431fd6a5b0b8248 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 2 Nov 2016 13:43:44 -0600 Subject: [PATCH] Decrease Watch.waitTime to 55. So it is less than the ConsulRawClient.HttpClient timeout of 60s fixes gh-240 --- .../cloud/consul/config/ConsulConfigProperties.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java index 5568128e..2a7d80fd 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulConfigProperties.java @@ -71,8 +71,11 @@ public class ConsulConfigProperties { @Data public class Watch { - /** The number of seconds to wait (or block) for watch query. Defaults to 60. */ - private int waitTime = 60; + /** The number of seconds to wait (or block) for watch query, defaults to 55. + * Needs to be less than default ConsulClient (defaults to 60). To increase ConsulClient + * timeout create a ConsulClient bean with a custom ConsulRawClient with a custom + * HttpClient. */ + private int waitTime = 55; /** If the watch is enabled. Defaults to true. */ private boolean enabled = true;