mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-07-05 04:39:47 +02:00
dns.getaddrinfo: Return proper error messages
This commit is contained in:
parent
f871a29f27
commit
5874d47f55
|
@ -109,7 +109,7 @@ static int inet_global_getaddrinfo(lua_State *L)
|
||||||
ret = getaddrinfo(hostname, NULL, &hints, &resolved);
|
ret = getaddrinfo(hostname, NULL, &hints, &resolved);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, "getaddrinfo returned error");
|
lua_pushstring(L, socket_gaistrerror(ret));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user