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
Describe the bug
Hi Guys , so i have a bug when disconnecting the socket using client.closeConnection(),
when the connection is closed, there are a few message sent, and im trying to reconnect with client.openConnection() ,
there are no event captured, it should capture the previous event , the event start captured when i sending a new message after i reconnect the socket
here is the function that i use to simulate disconnect & reconnect scenario
Hello @fathurayana , I would like to clarify your idea of where the events that are emitted should be accumulated while the device is offline. Could you be more specific on that please?
Describe the bug
Hi Guys , so i have a bug when disconnecting the socket using client.closeConnection(),
when the connection is closed, there are a few message sent, and im trying to reconnect with client.openConnection() ,
there are no event captured, it should capture the previous event , the event start captured when i sending a new message after i reconnect the socket
here is the function that i use to simulate disconnect & reconnect scenario
` const chatClient = useClient({
apiKey: process.env,
userData: { id: data?.user_id, language: "en" },
token: data?.access_token,
});
const simulateDisconnect = () => {
if (chatClient) {
chatClient.closeConnection();
setIsConnected(false);
}
};
const simulateReconnect = async () => {
if (chatClient) chatClient.openConnection();
setIsConnected(true);
};`
To Reproduce
Steps to reproduce the behavior:
Expected behavior
the previous event emitted when the connection disconnected should immediately captured when the client reconnect, not when the new message is sent
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: