Commit 24b05e3
fix(core): report SFU WebSocket connection/join timeouts accurately
Splits the SFU socket connect into a transport-open phase (bounded by
OkHttp's connect timeout) and a distinct join-response phase (bounded by
a dedicated timer via a new WebSocketConnected state), so a silent SFU no
longer hangs the join. Surfaces real transport failure messages and HTTP
status codes on the resulting NetworkError, routes all recoverable errors
through a single DisconnectedTemporarily state carrying the exact
code/reason, and maps both timeout flavours to REQUEST_TIMEOUT in analytics
(join-response via error code, transport via SocketTimeoutException cause).
Also moves join-error analytics to the join flow only, adds a per-session
SFU WS retry counter, and wires connectionTimeoutInMs from the builder to
both the OkHttp client and the join-response deadline.
Co-authored-by: Cursor <[email protected]>1 parent 6035a0d commit 24b05e3
19 files changed
Lines changed: 757 additions & 106 deletions
File tree
- stream-video-android-core
- api
- src
- main/kotlin/io/getstream/video/android/core
- call
- errors
- internal/module
- socket
- common
- coordinator
- sfu
- state
- test/kotlin/io/getstream/video/android/core
- rtc
- socket/sfu
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12038 | 12038 | | |
12039 | 12039 | | |
12040 | 12040 | | |
| 12041 | + | |
12041 | 12042 | | |
12042 | 12043 | | |
12043 | 12044 | | |
| |||
14408 | 14409 | | |
14409 | 14410 | | |
14410 | 14411 | | |
| 14412 | + | |
| 14413 | + | |
| 14414 | + | |
| 14415 | + | |
| 14416 | + | |
14411 | 14417 | | |
14412 | 14418 | | |
14413 | 14419 | | |
| |||
14858 | 14864 | | |
14859 | 14865 | | |
14860 | 14866 | | |
| 14867 | + | |
| 14868 | + | |
| 14869 | + | |
| 14870 | + | |
| 14871 | + | |
14861 | 14872 | | |
14862 | 14873 | | |
14863 | 14874 | | |
| |||
14935 | 14946 | | |
14936 | 14947 | | |
14937 | 14948 | | |
| 14949 | + | |
| 14950 | + | |
| 14951 | + | |
| 14952 | + | |
| 14953 | + | |
14938 | 14954 | | |
14939 | 14955 | | |
14940 | 14956 | | |
| |||
Lines changed: 73 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
770 | 771 | | |
771 | 772 | | |
772 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
773 | 778 | | |
774 | 779 | | |
775 | 780 | | |
776 | 781 | | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
785 | 811 | | |
786 | 812 | | |
787 | 813 | | |
788 | 814 | | |
789 | 815 | | |
790 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
791 | 849 | | |
792 | 850 | | |
793 | 851 | | |
| |||
1207 | 1265 | | |
1208 | 1266 | | |
1209 | 1267 | | |
1210 | | - | |
1211 | 1268 | | |
1212 | 1269 | | |
1213 | | - | |
| 1270 | + | |
1214 | 1271 | | |
1215 | 1272 | | |
1216 | 1273 | | |
1217 | 1274 | | |
1218 | | - | |
| 1275 | + | |
1219 | 1276 | | |
1220 | 1277 | | |
1221 | 1278 | | |
| |||
1291 | 1348 | | |
1292 | 1349 | | |
1293 | 1350 | | |
1294 | | - | |
1295 | 1351 | | |
1296 | 1352 | | |
1297 | | - | |
| 1353 | + | |
1298 | 1354 | | |
1299 | 1355 | | |
1300 | 1356 | | |
1301 | | - | |
| 1357 | + | |
1302 | 1358 | | |
1303 | 1359 | | |
1304 | 1360 | | |
| |||
2218 | 2274 | | |
2219 | 2275 | | |
2220 | 2276 | | |
2221 | | - | |
2222 | | - | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
2223 | 2280 | | |
2224 | 2281 | | |
2225 | 2282 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments