Skip to content

Commit

Permalink
fix nacos reboot, app cant re register (#404)
Browse files Browse the repository at this point in the history
* fix nacos reboot, app cant re register
  • Loading branch information
yifeng01 authored Feb 28, 2022
1 parent 3e8527b commit 97cc257
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,8 @@ func (c *ConnectionEventListener) redoRegisterEachService() {

func (c *ConnectionEventListener) CacheInstanceForRedo(serviceName, groupName string, instance model.Instance) {
key := util.GetGroupName(serviceName, groupName)
getInstance, ok := c.registeredInstanceCached.Get(key)
if !ok {
logger.Warnf("CacheInstanceForRedo get cache instance is null,key:%s", key)
return
}
if reflect.DeepEqual(getInstance.(model.Instance), instance) {
getInstance, _ := c.registeredInstanceCached.Get(key)
if getInstance != nil && reflect.DeepEqual(getInstance.(model.Instance), instance) {
return
}
c.registeredInstanceCached.Set(key, instance)
Expand Down

0 comments on commit 97cc257

Please sign in to comment.