-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy: replace net2 with socket2 #4891
Comments
As a side note, this isn't gonna be totally banished from our dependency tree until Tokio migrates from |
I actually have no idea why the integration tests don't just use |
Ah, the test change from |
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
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
The proxy depends on the
net2
crate, which has been deprecated and replaced bysocket2
. We should update our one or two uses:The text was updated successfully, but these errors were encountered: