@Override
public void close() {
+ if (this.bgpPeerSingletonService != null) {
+ this.bgpPeerSingletonService = null;
+ }
if (this.serviceRegistration != null) {
this.serviceRegistration.unregister();
this.serviceRegistration = null;
@Override
public synchronized FluentFuture<? extends CommitInfo> closeServiceInstance() {
if (this.bgpPeerSingletonService != null) {
- final FluentFuture<? extends CommitInfo> fut = this.bgpPeerSingletonService.closeServiceInstance();
- this.bgpPeerSingletonService = null;
- return fut;
+ return this.bgpPeerSingletonService.closeServiceInstance();
}
return CommitInfo.emptyFluentFuture();
}