-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
6 changed files
with
53 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters