-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
8.6.0.1
-
None
-
None
Steps to Reproduce
I have a problem similar to bug ZK-3916 (https://tracker.zkoss.org/browse/ZK-3916); in case of configuration with "max-desktops-per-session" setted, the automatic session timeout redirects unreliable with websockets enabled.
I am using zk version 8.6.0.1 and my configuration in zk.xml is:
<session-config>
<session-timeout>1800</session-timeout>
<device-type>ajax</device-type>
<timeout-uri>/stop_page.zul</timeout-uri>
<max-desktops-per-session>1</max-desktops-per-session>
</session-config>
<listener>
<listener-class>org.zkoss.zkmax.au.websocket.WebSocketWebAppInit</listener-class>
</listener>
If I use server-push in "comet mode" the redirect works fine
desktop.enableServerPush(false);
((DesktopCtrl) desktop).enableServerPush(new CometServerPush());
Clients.evalJavaScript("zWs.stop()");
If I use server-push in "websocket mode" the redirect does not work
((DesktopCtrl)desktop).enableServerPush(new WebSocketServerPush());
String wsurl = desktop.getWebApp().getAttribute("websocketUrl").toString();
boolean secure = ((HttpServletRequest) execution.getNativeRequest()).isSecure();
Clients.evalJavaScript(String.format("zWs.start('%s', %s);", wsurl, secure));
Could you help me please?
Thanks
Current Result
Expected Result
Debug Information
Workaround