mirror of
https://github.com/janet-lang/janet
synced 2025-01-26 07:06:51 +00:00
Fixed net/connect binding address
This commit is contained in:
parent
7acb5c63e0
commit
40080b23ae
@ -460,7 +460,7 @@ JANET_CORE_FN(cfun_net_connect,
|
|||||||
if (binding) {
|
if (binding) {
|
||||||
struct addrinfo *rp = NULL;
|
struct addrinfo *rp = NULL;
|
||||||
int did_bind = 0;
|
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) {
|
if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) {
|
||||||
did_bind = 1;
|
did_bind = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user