Unverified Commit adc1cc3a by Jason Song Committed by GitHub

Merge branch 'master' into textarea

parents 8df30f64 141627f3
......@@ -132,3 +132,4 @@ The project is licensed under the [Apache 2 license](https://github.com/ctripcor
![资产360](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/zc360.png)
![亿咖通](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/ecarx.png)
![5173](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/5173.png)
![沪江](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/hujiang.png)
......@@ -150,11 +150,6 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
if (!CollectionUtils.isEmpty(newNotifications)) {
deferredResultWrapper.setResult(newNotifications);
} else {
//register all keys
for (String key : watchedKeys) {
this.deferredResults.put(key, deferredResultWrapper);
}
deferredResultWrapper
.onTimeout(() -> logWatchedKeys(watchedKeys, "Apollo.LongPoll.TimeOutKeys"));
......@@ -166,6 +161,11 @@ public class NotificationControllerV2 implements ReleaseMessageListener {
logWatchedKeys(watchedKeys, "Apollo.LongPoll.CompletedKeys");
});
//register all keys
for (String key : watchedKeys) {
this.deferredResults.put(key, deferredResultWrapper);
}
logWatchedKeys(watchedKeys, "Apollo.LongPoll.RegisteredKeys");
logger.debug("Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}",
watchedKeys, appId, cluster, namespaces, dataCenter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment