diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2017-03-09 08:54:36 +0100 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2017-03-09 08:54:36 +0100 |
commit | 2c02d202c23909804d15200551c632cc69d9c66a (patch) | |
tree | 1fd623e3c85143315d5351ba2a87a1ff2f41bd0c /config-proxy | |
parent | 61a205c08d1e32b7c325119762b180030a28cad3 (diff) |
cosmetic rewrite
Diffstat (limited to 'config-proxy')
-rw-r--r-- | config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java index a2df139ad5d..0d84a184dca 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java @@ -132,11 +132,9 @@ class RpcConfigSourceClient implements ConfigSourceClient { } if (ProxyServer.configOrGenerationHasChanged(cachedConfig, request)) { log.log(LogLevel.SPAM, "Cached config is not equal to requested, will return it"); - ret = cachedConfig; - - // Someone else has replied - if (! delayedResponses.remove(delayedResponse)) { - ret = null; + if (delayedResponses.remove(delayedResponse)) { + // unless another thread already did it + ret = cachedConfig; } } if (!cachedConfig.isError()) { |