Commit 1b871c2
committed
test: buffer trickled candidates until both descriptions are applied
Candidate gathering starts inside createOffer and createAnswer via
setLocalDescription, so the test forwarded candidates to a peer that
often had no remote description yet. The native stack rejects such
candidates and nothing retries them, so when both directions lost all
candidates during the exchange the connection never formed and the
test burned its whole timeout. This was the common cause of the
intermittent iceCandidatesRespectPortAllocatorConfig failures on CI.
The peers now buffer outgoing candidates and deliver them after both
descriptions are set, forwarding directly from then on. The candidate
list also became a CopyOnWriteArrayList since it is written on the
signaling thread and read on the test thread.1 parent 81b725c commit 1b871c2
1 file changed
Lines changed: 36 additions & 3 deletions
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
121 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
| |||
165 | 173 | | |
166 | 174 | | |
167 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
168 | 196 | | |
169 | 197 | | |
170 | 198 | | |
171 | | - | |
172 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
173 | 205 | | |
| 206 | + | |
174 | 207 | | |
175 | 208 | | |
176 | 209 | | |
| |||
0 commit comments