mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
http client: Fix overwite of addrlen for connect if binding to iface
The addrlen argument to connect() was overwritten by the lws_socket_bind() result, which is a port number. Fixes https://github.com/warmcat/libwebsockets/issues/1817
This commit is contained in:
parent
04ec3d6f73
commit
6555d4d51c
1 changed files with 2 additions and 2 deletions
|
@ -566,9 +566,9 @@ ads_known:
|
|||
_WSI_TOKEN_CLIENT_IFACE);
|
||||
|
||||
if (iface && *iface) {
|
||||
n = lws_socket_bind(wsi->vhost, wsi->desc.sockfd, 0,
|
||||
m = lws_socket_bind(wsi->vhost, wsi->desc.sockfd, 0,
|
||||
iface, wsi->ipv6);
|
||||
if (n < 0)
|
||||
if (m < 0)
|
||||
goto try_next_result_fds;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue