Skip to content
Snippets Groups Projects
Commit 53587ecc authored by wangwx's avatar wangwx
Browse files

try to fix ut failed

parent 7ad26fd6
No related branches found
No related tags found
No related merge requests found
......@@ -207,11 +207,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
)
event = make(chan struct{}, 4)
ttl = DefaultTTL
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)
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)
}
}
defer close(event)
for {
......
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