fix: 127.0.0.1 is not loopback (#5)

This commit is contained in:
乐 authored and GitHub committed 2025-02-06 20:03:29 +08:00
1 parent 379ba44ad9
commit 09ff39cc82
1 file changed
+2 -1
+2 -1
View File
@@ -1181,7 +1181,8 @@ impl RendezvousServer {
async fn handle_listener2(&self, stream: TcpStream, addr: SocketAddr) {
let mut rs = self.clone();
if addr.ip().is_loopback() {
let ip = try_into_v4(addr).ip();
if ip.is_loopback() {
tokio::spawn(async move {
let mut stream = stream;
let mut buffer = [0; 1024];