Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuwan committed Aug 6, 2020
1 parent c33f4ea commit 9b4745f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions remoting/zookeeper/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

var (
DefaultTTL = 15 * time.Minute
defaultTTL = 15 * time.Minute
)

// nolint
Expand Down Expand Up @@ -206,13 +206,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
zkEvent zk.Event
)
event = make(chan struct{}, 4)
ttl = DefaultTTL
ttl = defaultTTL
if conf != nil {
timeout, err := time.ParseDuration(conf.GetParam(constant.REGISTRY_TTL_KEY, constant.DEFAULT_REG_TTL))
if err == nil {
ttl = timeout
} else {
logger.Warnf("wrong configuration for registry ttl, error:=%+v", err)
logger.Warnf("wrong configuration for registry ttl, error:=%+v, using default value %v instead", err, defaultTTL)
}
}
defer close(event)
Expand Down

0 comments on commit 9b4745f

Please sign in to comment.