Skip to content

Commit 18db83f

Browse files
committed
Auto merge of rust-lang#86669 - Smittyvb:satisfy-windows-defender, r=Mark-Simulacrum
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 passes regardless of how you respond to the modal, since the firewall only affects traffic outside of the computer, none of which actually happens in the test). The test server doesn't actually need to be publicly reachable, so this makes it so it is only reachable locally, which makes Windows Defender happy.
2 parents a435b49 + 63cc169 commit 18db83f

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)