Closed revertiz closed 2 months ago
How are you disabling your internet connection? And is your server running locally?
How are you disabling your internet connection? And is your server running locally?
Thanks. In the logs you shared, I can see both
23:50:11.361 livekit-client.esm.mjs:21326 room event reconnected {room: '!NeGhSXJYtaMmIgxgIk:matrix.meedio.pro', roomID: 'RM_o4Tt2VegfDwU', participant: '@cw4s1ohjnb:matrix.meedio.pro:VSIPQLWNPN', pID: 'PA_DJBmpTmFjqGG', event: 'reconnected', …}
and, a little earlier
23:50:11.361 useHandleLivekitReconnection.ts:54 ConnectionStateChanged event connected
which sounds like your logic around this picked up on connectionState changing back to connected
edit: Ah, I see, the second time it doesn't work the same anymore. It seems to get stuck at some point, probably with the PeerConnection status. Will take a closer look
This should be fixed as a side effect of https://github.com/livekit/client-sdk-js/pull/1158. However I also opened a separate PR, before realising that, which would address this issue more specifically. I'll leave #1164 as a draft for now. But if you could try with the changes in #1158 applied and see if you can still repro, that would be great!
This should be fixed as a side effect of #1158. However I also opened a separate PR, before realising that, which would address this issue more specifically. I'll leave #1164 as a draft for now. But if you could try with the changes in #1158 applied and see if you can still repro, that would be great!
Hey, i've tested and can confirm that this PR indeed fixes it: https://github.com/livekit/client-sdk-js/pull/1158. You can close the issue, thank you very much!
Describe the bug
When i have a bad internet connection the room reconnect event is not completely reliable
Reproduction
Reproducibility <50%:
Logs
client-ignasp-local.front-4877.pr.meedio.pro-1718225459290.log server-ignasp-local.front-4877.pr.meedio.pro-1718225459290.json
System Info
Severity
annoyance
Additional Information
In the client logs there's my added log "timer ran out roomStateRef.current: disconnected"(timer runs out, because it didn't receive the reconnected event and didn't get cleared). It seems that the room ConnectionState is 'disconnected' even though both participants can see each other.