Browse Source

Merge pull request #2087 from brenuart/gh1534

React on ContextClosedEvent only if from "our" context
pull/6/head
Ryan Baxter 7 years ago committed by GitHub
parent
commit
d0009ba05a
  1. 3
      spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistration.java

3
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistration.java

@ -122,8 +122,9 @@ public class EurekaAutoServiceRegistration implements AutoServiceRegistration, S @@ -122,8 +122,9 @@ public class EurekaAutoServiceRegistration implements AutoServiceRegistration, S
@EventListener(ContextClosedEvent.class)
public void onApplicationEvent(ContextClosedEvent event) {
// register in case meta data changed
if( event.getApplicationContext() == context ) {
stop();
}
}
}

Loading…
Cancel
Save