This content has been marked as final. Show 3 replies
I have a Qlik Sense mashup that opens several Qlik Sense applications via the Root API. The key is that a websocket created/opened in the browser for each opened application. Here's some background:
As users navigate the mashup website, previously opened apps may no longer be needed (I know what apps are referenced as the route state is resolved) so I'd like to clean up websockets by closing the unused applications. However, when I do so, I receive qlik.js exceptions after the fact, even though I KNOW the apps aren't needed. I call clearAll(true) - yep, I wait for the promise - followed by close(). The exception, which unfortunately I don't have handy, related to a promise, so I imagine there was a call on the closed app, that was supposed to return a promise, but the target of the promise call was null or undefined.
Is there a preferred way to clean up application objects so that websocket counts are minimized? Can I query a Qlik API to determine # of open websockets? Can I query a Qlik API to retrieve the collection of open websockets? Anything else that might be helpful? If you need the exact exception I can create a sample mashup that toggles between 2 routes, and have each route open a couple of mutually exclusive apps, and close the other unused apps.
This is a website requirement for us in terms of the Internet Explorer default maximum of 6 concurrent websocket connections. We encourage use of Chrome, but need to support IE as well.