Commit e0e1c7d
Tarek Loubani
fix(call): ignore stale roomJoined events that fire before joinRoomAndCall
When the app launches and immediately joins an existing call, the
WebSocket may already be connected from a previous session. The server
sends a stale roomJoined event before joinRoomAndCall() is called,
causing performCall() to fire prematurely. Later when joinRoomAndCall
runs, the WebSocket does a local join and the server never re-sends the
participant list. The call stays stuck in JOINED and never transitions
to IN_CONVERSATION.
Add joinRoomInitiated flag to guard the roomJoined handler against stale
events. Only process roomJoined after joinRoomAndCall has been called.
Signed-off-by: Tarek Loubani <tarek@tarek.org>1 parent b17ec5b commit e0e1c7d
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| |||
1521 | 1522 | | |
1522 | 1523 | | |
1523 | 1524 | | |
| 1525 | + | |
1524 | 1526 | | |
1525 | 1527 | | |
1526 | 1528 | | |
| |||
1874 | 1876 | | |
1875 | 1877 | | |
1876 | 1878 | | |
1877 | | - | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1878 | 1884 | | |
1879 | 1885 | | |
1880 | 1886 | | |
| |||
1943 | 1949 | | |
1944 | 1950 | | |
1945 | 1951 | | |
| 1952 | + | |
1946 | 1953 | | |
1947 | 1954 | | |
1948 | 1955 | | |
| |||
0 commit comments