fix(endpoints): skip stopping empty groups
fix gravitee-io/issues#1572
@@ -130,8 +130,11 @@ public class DefaultGroupLifecycleManager extends AbstractLifecycleComponent<Gro
EndpointGroupLifecycleManager group = ite.next();
group.stop();
ite.remove();
+ //skip if no LbGroup (in case of an empty endpoint group)
+ if (group.getGroup() != null) {
referenceRegister.remove(GroupReference.REFERENCE_PREFIX + group.getGroup().getName());
}
+ }
groups.clear();
defaultGroup = null;
