Skip to content

Commit

Permalink
NXIO-176 check location is set
Browse files Browse the repository at this point in the history
  • Loading branch information
dmetzler committed May 23, 2014
1 parent dfc3746 commit dec06ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etcdwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ func (w *watcher) registerEnvironment(node *etcd.Node, action string) {

actualEnv := w.environments[envName].Get(env.key)

if(!actualEnv.equals(env)) {
if(!actualEnv.equals(env) && env.location != nil) {

if env.location.Host != "" && env.location.Port != 0 {
w.environments[envName].Add(env)
glog.Infof("Registering environment %s with address : http://%s:%d/", envName, env.location.Host, env.location.Port)
glog.Infof("Registering environment %s with location : http://%s:%d/", envName, env.location.Host, env.location.Port)

}

Expand Down

0 comments on commit dec06ae

Please sign in to comment.