From 40080b23aee54f8cd0275644ae0fc7c317a1579d Mon Sep 17 00:00:00 2001 From: Ico Doornekamp Date: Tue, 30 May 2023 16:57:17 +0200 Subject: [PATCH] Fixed net/connect binding address --- src/core/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/net.c b/src/core/net.c index 37d4b486..273eee36 100644 --- a/src/core/net.c +++ b/src/core/net.c @@ -460,7 +460,7 @@ JANET_CORE_FN(cfun_net_connect, if (binding) { struct addrinfo *rp = NULL; int did_bind = 0; - for (rp = ai; rp != NULL; rp = rp->ai_next) { + for (rp = binding; rp != NULL; rp = rp->ai_next) { if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) { did_bind = 1; break; -- 2.45.2