Skip to content

Commit

Permalink
Merge pull request #1171 from zevv/zevv-net-connect
Browse files Browse the repository at this point in the history
Fixed net/connect binding address
  • Loading branch information
bakpakin authored May 30, 2023
2 parents 7acb5c6 + 40080b2 commit 9c97d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c97d8f

Please sign in to comment.