Description
Line #110 of InstanceCleanup reads:
if ( instance.getServiceType() != ServiceType.PERMANENT )
It should be:
if ( instance.getServiceType() == ServiceType.STATIC )
Otherwise the cleanup code processes dynamic registrations such as it's own registration.
Since dynamic registrations are created with EPHEMERAL nodes (ServiceDiscoveryImpl#175) there is no need to cleanup dynamic registrations anyway.