未验证 提交 adc1cc3a 编写于 作者: J Jason Song 提交者: GitHub

Merge branch 'master' into textarea

......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册