GUACAMOLE-2181: Avoid NPE if servlet container is shut down before extensions are loaded.
This commit is contained in:
1 file changed
+2
@@ -297,6 +297,7 @@ public class GuacamoleServletContextListener extends GuiceServletContextListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Inform any listeners that application shutdown has completed
|
// Inform any listeners that application shutdown has completed
|
||||||
|
if (listenerService != null) {
|
||||||
try {
|
try {
|
||||||
listenerService.handleEvent(new ApplicationShutdownEvent() {
|
listenerService.handleEvent(new ApplicationShutdownEvent() {
|
||||||
// The application shutdown event currently has no content
|
// The application shutdown event currently has no content
|
||||||
@@ -305,6 +306,7 @@ public class GuacamoleServletContextListener extends GuiceServletContextListener
|
|||||||
catch (GuacamoleException e) {
|
catch (GuacamoleException e) {
|
||||||
logger.error("An extension listening for application shutdown failed: {}", e.getMessage(), e);
|
logger.error("An extension listening for application shutdown failed: {}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|||||||
Reference in new issue
Block a user