You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we logout with SDK, the project object never really gets destroyed. It can be reused again, particularly in case of browsers. This is where we are encountering an error with subscriptions.
Senario
Developer subscribed to a topic (as a part of app logic). Then logged out and logged back in. The app logic will kick in again and we will try to subscribe to the topic again. The callback will getting stacked, but SDK isn't sending sub packet to server.
This is happening because the project object was reused. We were already subscribed to the topic, the older callback was stacked and as per the logic of SDK, we don't send another sub packet to server if it was subscribed before (we just stack the second callback and relay event to both callbacks whenever we get an update). But now in our case, because of the logout, the topic was automatically unsubscribed on server. But to SDK, the topic was subscribed (since there is already a callback on the topic).
This issue can be easily fixed by simply flushing the event handlers on logout event (when connection gets closed).
The text was updated successfully, but these errors were encountered:
When we logout with SDK, the project object never really gets destroyed. It can be reused again, particularly in case of browsers. This is where we are encountering an error with subscriptions.
Senario
Developer subscribed to a topic (as a part of app logic). Then logged out and logged back in. The app logic will kick in again and we will try to subscribe to the topic again. The callback will getting stacked, but SDK isn't sending sub packet to server.
This is happening because the project object was reused. We were already subscribed to the topic, the older callback was stacked and as per the logic of SDK, we don't send another sub packet to server if it was subscribed before (we just stack the second callback and relay event to both callbacks whenever we get an update). But now in our case, because of the logout, the topic was automatically unsubscribed on server. But to SDK, the topic was subscribed (since there is already a callback on the topic).
This issue can be easily fixed by simply flushing the event handlers on logout event (when connection gets closed).
The text was updated successfully, but these errors were encountered: