- // TODO direct registration/close seem to trigger a bug in singleton state transitions,
- // remove whole executor shenanigans after it's fixed.
- // Needs to be delayed slightly otherwise it's triggered as well.
- EXECUTOR.schedule(() -> {
- LOG.debug("Running re-registration");
- try {
- registration = singletonServiceProvider.registerClusterSingletonService(this);
- } catch (final Exception e) {
- LOG.warn("There was a problem re-registering flapping singleton service.", e);
- setInactive();
- flapCount = -flapCount - 1;
- }
-
- }, 200, TimeUnit.MILLISECONDS);
+ LOG.debug("Running re-registration");
+ try {
+ registration = singletonServiceProvider.registerClusterSingletonService(this);
+ } catch (final Exception e) {
+ LOG.warn("There was a problem re-registering flapping singleton service.", e);
+ setInactive();
+ flapCount = -flapCount - 1;
+ }