Commit be8e15d
authored
Better waiter errors with NIOTS (#1775)
Motivation:
When establishing a connection using NIOTS, Network.framework may enter
a 'waiting' state because of a transient error. This is surfaced as a
user inbound event.
In many cases the connect call won't resolve until the connect timeout
passes (defaults to 20 seconds). Attempts to start a call on this
connection during this time will fail with a timeout at the connection
pool layer (where the max wait time defaults to 5 seconds) and users
will see a 'deadline exceeded' error without any more context. However,
we can provide more information by passing up the transient error from
Network.framework to the connection pool.
This isn't currently possible as events flow up on state changes, in
this case from connecting to transient failure when the connect times
out.
Modifications:
- Catch the `WaitingForConnectivity` event and bubble up its error
though the idle handler to the connection pool
Result:
Better errors on connect timeouts in some situations1 parent a260bb3 commit be8e15d
File tree
4 files changed
+112
-9
lines changed- Sources/GRPC
- ConnectionPool
- Tests/GRPCTests
4 files changed
+112
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
663 | 684 | | |
664 | 685 | | |
665 | 686 | | |
| |||
935 | 956 | | |
936 | 957 | | |
937 | 958 | | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
938 | 969 | | |
939 | 970 | | |
940 | 971 | | |
941 | 972 | | |
942 | 973 | | |
943 | 974 | | |
944 | | - | |
| 975 | + | |
945 | 976 | | |
946 | | - | |
947 | | - | |
| 977 | + | |
| 978 | + | |
948 | 979 | | |
949 | 980 | | |
950 | 981 | | |
| |||
953 | 984 | | |
954 | 985 | | |
955 | 986 | | |
956 | | - | |
| 987 | + | |
957 | 988 | | |
958 | 989 | | |
959 | | - | |
| 990 | + | |
960 | 991 | | |
961 | 992 | | |
962 | 993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
860 | 866 | | |
861 | 867 | | |
862 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
211 | 268 | | |
212 | 269 | | |
213 | 270 | | |
| |||
0 commit comments