diff --git a/modules/web6/src/com/haulmont/cuba/web/DefaultApp.java b/modules/web6/src/com/haulmont/cuba/web/DefaultApp.java index 974cc88043..ee3ded907d 100644 --- a/modules/web6/src/com/haulmont/cuba/web/DefaultApp.java +++ b/modules/web6/src/com/haulmont/cuba/web/DefaultApp.java @@ -153,33 +153,22 @@ public class DefaultApp extends App implements ConnectionListener { afterLoggedIn(); } else { log.debug("Closing all windows"); + cleanupBackgroundTasks(); + getTimers().stopAll(); - if (webConfig.getInvalidateHttpSessionOnLogout()) { - cleanupBackgroundTasks(); - getTimers().stopAll(); + closeAllWindows(); - closeAllWindows(); + String name = currentWindowName.get(); + if (name == null) + name = createWindowName(false); - this.close(); - } else { - cleanupBackgroundTasks(); - getTimers().stopAll(); + Window window = createLoginWindow(); + window.setName(name); + setMainWindow(window); - closeAllWindows(); + currentWindowName.set(window.getName()); - String name = currentWindowName.get(); - if (name == null) { - name = createWindowName(false); - } - - Window window = createLoginWindow(); - window.setName(name); - setMainWindow(window); - - currentWindowName.set(window.getName()); - - initExceptionHandlers(false); - } + initExceptionHandlers(false); } }