Makes sure that whenever a conference is left or switched, the local participant's id will be equal to the default value. The problem fixed by this commit is a situation where the local participant may end up sharing the same ID with it's "ghost" when rejoining a disconnected conference. The most important and easiest to hit case is when the conference is left after the CONFERENCE_FAILED event. Another rare and harder to encounter in the real world issue is where CONFERENCE_LEFT may come with the delay due to it's asynchronous nature. The step by step scenario is as follows: trying to leave a conference, but the network is not doing well, so it takes time, requests are timing out. After getting back to the welcome page the the CONFERENCE_LEFT has not arrived yet. The same conference is joined again and the load config may timeout, but it will be read from the cache. Now the network gets better and conference is joining which results in our ghost participant added to the redux state. At this point there's the root issue: two participants with the same id, because the local one was neither cleared nor set to the new one yet (PARTICIPANT_JOINED come, before CONFERENCE_JOINED where we adjust the id). Then comes CONFERENCE_JOINED and we try to update our local id. We're updating the ID of both ghost and local participant. It could be also that the delayed CONFERENCE_LEFT comes for the old conference, but it's too late and it would update the id for both participants. The approach here reasons that the ID of the local participant may be reset as soon as the local participant and, respectively, her ID is no longer involved in a recoverable JitsiConference of interest to the user and, consequently, the app. Co-authored-by: Pawel Domas <pawel.domas@jitsi.org> Co-authored-by: Lyubo Marinov <lmarinov@atlassian.com>master
|
|
||
7 |
|
7 |
|
8 |
|
8 |
|
9 |
|
9 |
|
10 |
|
|
|
|
10 |
|
|
|
11 |
|
|
11 |
|
12 |
|
12 |
|
13 |
|
13 |
|
14 |
|
|
|
||
40 |
|
41 |
|
41 |
|
42 |
|
42 |
|
43 |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
43 |
|
83 |
|
44 |
|
84 |
|
45 |
|
85 |
|
|
|
||
34 |
|
34 |
|
35 |
|
35 |
|
36 |
|
36 |
|
37 |
|
|
|
38 |
|
37 |
|
39 |
|
38 |
|
|
39 |
|
|
40 |
|
40 |
|
41 |
|
41 |
|
42 |
|
42 |
|
|
|
||
354 |
|
354 |
|
355 |
|
355 |
|
356 |
|
356 |
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
|
357 |
|
|
361 |
|
358 |
|
362 |
|
359 |
|
363 |
|
360 |
|
364 |
|
361 |
|
365 |
|
362 |
|
366 |
|
363 |
|
367 |
|
|
|
368 |
|
|
|
369 |
|
|
|
370 |
|
|
|
371 |
|
|
|
372 |
|
|
|
373 |
|
|
|
374 |
|
|
|
375 |
|
|
|
376 |
|
|
|
377 |
|
|
|
378 |
|
|
|
379 |
|
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
380 |
|
367 |
|
381 |
|
|
|
|
368 |
|
|
|
369 |
|
|
|
370 |
|
|
382 |
|
371 |
|
383 |
|
372 |
|
384 |
|
373 |
|
|
|
||
1 |
|
1 |
|
2 |
|
2 |
|
3 |
|
3 |
|
4 |
|
|
|
|
4 |
|
|
5 |
|
5 |
|
6 |
|
6 |
|
7 |
|
7 |
|
|
|
||
59 |
|
59 |
|
60 |
|
60 |
|
61 |
|
61 |
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
62 |
|
67 |
|
63 |
|
68 |
|
64 |
|
|
|
||
146 |
|
142 |
|
147 |
|
143 |
|
148 |
|
144 |
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
|
|
|
158 |
|
|
|
159 |
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
|
|
149 |
|
180 |
|
150 |
|
181 |
|
151 |
|
182 |
|
|
|
||
11 |
|
11 |
|
12 |
|
12 |
|
13 |
|
13 |
|
|
14 |
|
|
14 |
|
15 |
|
15 |
|
16 |
|
16 |
|
17 |
|
|
|
||
249 |
|
250 |
|
250 |
|
251 |
|
251 |
|
252 |
|
|
253 |
|
|
252 |
|
254 |
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
|
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
269 |
|
259 |
|
270 |
|
|
|
271 |
|
|
|
272 |
|
260 |
|
273 |
|
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
274 |
|
265 |
|
275 |
|
266 |
|
276 |
|
267 |
|