Skip to content

Commit

Permalink
Merge pull request #80 from wuzuoliang/len(oldValue.Different(newValu…
Browse files Browse the repository at this point in the history
…e))==0

Update agollo.go
  • Loading branch information
shima-park authored Feb 6, 2023
2 parents 7741370 + 9d726ca commit 9f10f58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions agollo.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ func (a *agollo) longPoll() {
if status == http.StatusNotModified {
continue
}

if len(oldValue.Different(newValue)) == 0 {
// case 可能是apollo集群搭建问题
// GetConfigsFromNonCache 返回了了一模一样的数据,但是http.status code == 200
// 导致NotificationID更新了,但是真实的配置没有更新,而后续也不会获取到新配置,除非有新的变更触发
continue
}

// 发送到监听channel
a.sendWatchCh(notification.NamespaceName, oldValue, newValue)
Expand Down

0 comments on commit 9f10f58

Please sign in to comment.