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