Skip to content

Commit b6f738d

Browse files
committed
Ignore shutdown errors
1 parent 252f71e commit b6f738d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/src/main/java/org/openmrs/web/Listener.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,13 @@ public static void startOpenmrs(ServletContext servletContext) throws ServletExc
361361
SchedulerUtil.startup(getRuntimeProperties());
362362
}
363363
catch (Exception t) {
364-
Context.shutdown();
365-
WebModuleUtil.shutdownModules(servletContext);
364+
try {
365+
Context.shutdown();
366+
WebModuleUtil.shutdownModules(servletContext);
367+
}
368+
catch (Throwable tw) {
369+
//ignore shutdown error
370+
}
366371
throw new ServletException(t);
367372
}
368373
finally {

0 commit comments

Comments
 (0)