Skip to content
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

Expose service to both IPv4 and IPv6 #1307

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions discovery/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ use std::{
borrow::Cow,
collections::BTreeMap,
convert::Infallible,
net::{Ipv4Addr, SocketAddr, TcpListener},
net::{IpAddr, SocketAddr, TcpListener},
pin::Pin,
str::FromStr,
sync::Arc,
task::{Context, Poll},
};
Expand Down Expand Up @@ -251,7 +252,7 @@ pub struct DiscoveryServer {
impl DiscoveryServer {
pub fn new(config: Config, port: &mut u16) -> Result<Self, Error> {
let (discovery, cred_rx) = RequestHandler::new(config);
let address = SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), *port);
let address = SocketAddr::new(IpAddr::from_str("::0").unwrap(), *port);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to: #1307 (comment)


let (close_tx, close_rx) = oneshot::channel();

Expand Down