Skip to content

Commit

Permalink
revert to daemons listening to 127.0.0.1 by default
Browse files Browse the repository at this point in the history
clients can not connect to `0.0.0.0` on windows.
  • Loading branch information
Michael-J-Ward committed Apr 16, 2024
1 parent 1ba763c commit 4af82a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion binaries/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ enum Command {
#[clap(long)]
machine_id: Option<String>,
#[clap(long, default_value_t = SocketAddr::new(
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0)
IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 0)
)]
bind: SocketAddr,
#[clap(long)]
Expand Down
1 change: 1 addition & 0 deletions binaries/daemon/src/inter_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub async fn spawn_listener_loop(
.local_addr()
.wrap_err("failed to get local addr of socket")?;

tracing::debug!("inter-daemon listener starting for machine `{machine_id}` on {socket_addr}");
tokio::spawn(async move {
listener_loop(socket, events_tx).await;
tracing::debug!("inter-daemon listener loop finished for machine `{machine_id}`");
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple-daemons/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn main() -> eyre::Result<()> {

let (coordinator_events_tx, coordinator_events_rx) = mpsc::channel(1);
let coordinator_bind = SocketAddr::new(
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)),
IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)),
DORA_COORDINATOR_PORT_DEFAULT,
);
let (coordinator_addr, coordinator) =
Expand Down

0 comments on commit 4af82a4

Please sign in to comment.