mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-11 16:40:17 +00:00
Fixed #343 in conn2() for Lua
This commit is contained in:
1 parent
e0214af422
commit
458320cffb
1 file changed
+1
-1
+1
-1
@@ -3793,7 +3793,7 @@ static sock_t conn2(const char *host, int port) {
|
|||||||
if (host != NULL &&
|
if (host != NULL &&
|
||||||
(he = gethostbyname(host)) != NULL &&
|
(he = gethostbyname(host)) != NULL &&
|
||||||
(sock = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET) {
|
(sock = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET) {
|
||||||
set_close_on_exec(sock);
|
ns_set_close_on_exec(sock);
|
||||||
sin.sin_family = AF_INET;
|
sin.sin_family = AF_INET;
|
||||||
sin.sin_port = htons((uint16_t) port);
|
sin.sin_port = htons((uint16_t) port);
|
||||||
sin.sin_addr = * (struct in_addr *) he->h_addr_list[0];
|
sin.sin_addr = * (struct in_addr *) he->h_addr_list[0];
|
||||||
|
|||||||
Reference in new issue
Block a user