I was trying to use daml useStreamQuery hook to get the updated result over websocket connection. But when i am unmounting component still i see those websocket connection in pending state for sometime, and later it opens another set of websocket connection for same queries for the same unmounted component. Could anyone help me in resolving this issue?
Thanks for the report! I have been able to reproduce a similar issue, and am working on a fix. I’ll let you know when the fix is available for testing.
I believe I have fixed the root cause for this issue in this PR, though I unfortunately missed today’s snapshot release. I will ping you again here when we make a release that includes that change (likely next Wednesday).
In the meantime, a workaround could be to set a very long
reconnectThreshold value, as the current implementation will only reconnect if the connection was active for longer than that value (given in milliseconds, defaulting to 30 000, i.e. 30s).
Thanks @Gary_Verhaegen for the quick reply.