Skip to content

Commit 63cc169

Browse files
committed
Don't run a publically reachable server in tests
This causes Windows Defender's firewall to pop up during tests to ask if I want to allow the test program to access the public Internet, since it was listening on `0.0.0.0`. The test server doesn't actually need to be publically reachable, so this makes it so it is only reachable locally, which makes Windows Defender happy.
1 parent b8be316 commit 63cc169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/ui/process-termination/process-termination-blocking-io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{net::TcpListener, sync::mpsc, thread};
99
fn main() {
1010
let (tx, rx) = mpsc::channel();
1111
thread::spawn(move || {
12-
let listen = TcpListener::bind("0.0.0.0:0").unwrap();
12+
let listen = TcpListener::bind("127.0.0.1:0").unwrap();
1313
tx.send(()).unwrap();
1414
while let Ok(_) = listen.accept() {}
1515
});

0 commit comments

Comments
 (0)