Only configure ServiceDiscovery if null rather than not null.

fixes gh-111
This commit is contained in:
Spencer Gibb
2017-02-01 12:14:36 -07:00
parent 2c80fa7a69
commit c6fee690ab

View File

@@ -120,7 +120,7 @@ public class ZookeeperServiceDiscovery implements ZookeeperRegistration, Applica
configureServiceInstance(this.serviceInstance, this.appName,
this.context, this.port, host, uriSpec);
}
if (this.serviceDiscovery.get() != null) {
if (this.serviceDiscovery.get() == null) {
configureServiceDiscovery(this.serviceDiscovery, this.curator, this.properties,
this.instanceSerializer, this.serviceInstance);
}