diff options
| author | Smitty <me@smitop.com> | 2021-06-27 09:53:27 -0400 |
|---|---|---|
| committer | Smitty <me@smitop.com> | 2021-06-27 09:53:27 -0400 |
| commit | 63cc169d1e300aa3552a6f7a4ce216169d20cdcf (patch) | |
| tree | 630d0a5fc72b058c2b82474f10bdfca7dd56feb6 | |
| parent | b8be3162d734f3583b240977615f3e1bae6b364a (diff) | |
| download | rust-63cc169d1e300aa3552a6f7a4ce216169d20cdcf.tar.gz rust-63cc169d1e300aa3552a6f7a4ce216169d20cdcf.zip | |
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.
| -rw-r--r-- | src/test/ui/process-termination/process-termination-blocking-io.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/process-termination/process-termination-blocking-io.rs b/src/test/ui/process-termination/process-termination-blocking-io.rs index f306a61a538..b2dab5c9381 100644 --- a/src/test/ui/process-termination/process-termination-blocking-io.rs +++ b/src/test/ui/process-termination/process-termination-blocking-io.rs @@ -9,7 +9,7 @@ use std::{net::TcpListener, sync::mpsc, thread}; fn main() { let (tx, rx) = mpsc::channel(); thread::spawn(move || { - let listen = TcpListener::bind("0.0.0.0:0").unwrap(); + let listen = TcpListener::bind("127.0.0.1:0").unwrap(); tx.send(()).unwrap(); while let Ok(_) = listen.accept() {} }); |
