Browse Source

Merge branch '1.2.x'

# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-commons-dependencies/pom.xml
#	spring-cloud-commons/pom.xml
#	spring-cloud-context/pom.xml
#	spring-cloud-starter/pom.xml
pull/270/head
Spencer Gibb 7 years ago
parent
commit
449f51a748
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 15
      spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java

15
spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java

@ -102,7 +102,20 @@ public class ContextRefresher { @@ -102,7 +102,20 @@ public class ContextRefresher {
}
finally {
ConfigurableApplicationContext closeable = capture;
closeable.close();
while (closeable != null) {
try {
closeable.close();
}
catch (Exception e) {
// Ignore;
}
if (closeable.getParent() instanceof ConfigurableApplicationContext) {
closeable = (ConfigurableApplicationContext) closeable.getParent();
}
else {
break;
}
}
}
}

Loading…
Cancel
Save