Commit fc7ae2d
authored
The proxy's integration tests depend on the `net2` crate, which has been
deprecated and replaced by `socket2`. Since `net2` is no longer actively
maintained, `cargo audit` will warn us about it, so we should replace it
with `socket2`.
While I was making this change, I was curious why we were manually
constructing and binding these sockets at all, rather than just using
`tokio::net::TcpListener::bind`. After some archaeology, I determined
that this was added in linkerd/linkerd2#952, which added a test that
requires a delay between when a socket is _bound_ and when it starts
_listening_. `tokio::net::TcpListener::bind` (as well as the `std::net`
version) perform these operations together. Since this wasn't obvious
from the test code, I went ahead and moved the new `socket2` version of
this into a pair of functions, with comments explaining why we didn't
just use `tokio::net`.
Fixes linkerd/linkerd2#4891
1 parent 487e85e commit fc7ae2d
File tree
6 files changed
+53
-23
lines changed- linkerd/app
- integration
- src
6 files changed
+53
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
| 720 | + | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
779 | 778 | | |
780 | 779 | | |
781 | 780 | | |
| |||
910 | 909 | | |
911 | 910 | | |
912 | 911 | | |
913 | | - | |
914 | 912 | | |
915 | 913 | | |
916 | 914 | | |
917 | 915 | | |
| 916 | + | |
918 | 917 | | |
919 | 918 | | |
920 | 919 | | |
| |||
2138 | 2137 | | |
2139 | 2138 | | |
2140 | 2139 | | |
2141 | | - | |
| 2140 | + | |
2142 | 2141 | | |
2143 | | - | |
| 2142 | + | |
2144 | 2143 | | |
2145 | 2144 | | |
2146 | 2145 | | |
| |||
2339 | 2338 | | |
2340 | 2339 | | |
2341 | 2340 | | |
2342 | | - | |
| 2341 | + | |
2343 | 2342 | | |
2344 | | - | |
| 2343 | + | |
2345 | 2344 | | |
2346 | 2345 | | |
2347 | 2346 | | |
| 2347 | + | |
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 336 | | |
343 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
344 | 342 | | |
345 | 343 | | |
346 | | - | |
| 344 | + | |
| 345 | + | |
347 | 346 | | |
348 | 347 | | |
349 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 204 | + | |
| 205 | + | |
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
| |||
223 | 221 | | |
224 | 222 | | |
225 | 223 | | |
226 | | - | |
227 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
| |||
0 commit comments