GUACAMOLE-2181: Avoid NPE if servlet container is shut down before extensions are loaded.

This commit is contained in:
Michael Jumper committed 2025-12-12 10:42:28 -08:00
1 parent 751ca979ce
commit 10558b2682
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 {