Describe the bug An application that actively unregisters from eureka fires EurekaInstanceCanceledEvent twice. Spring Cloud Netflix Duplicate event: EurekaInstanceCanceledEvent

The REST endpoint for unregister is executed. The first event is fired, as handleCancelation was added directly to the overridden cancel method. The original cancel method delegates to internalCancel which again was overridden by spring and handleCancelation was added there too.

I think it should be save to remove the overridden cancel method and only keep internalCancel. WDYT?

Comment From: spencergibb

is it causing a problem?

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: fanste

is it causing a problem?

You can workaround the duplicated event using an own collection to track the active instances. But it's not nice, that the event is fired twice.

Comment From: heowc

After tracking it, it appears to be a duplicate event caused by #1376. - https://github.com/spring-cloud/spring-cloud-netflix/issues/1376

I think this could be done with one of cancel and internalCancel removed. (Perhaps cancel?)

WDYT? 🤔