mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 14:28:21 +01: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);
|
||||
if (ret != 0) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, "getaddrinfo returned error");
|
||||
lua_pushstring(L, socket_gaistrerror(ret));
|
||||
return 2;
|
||||
}
|
||||
lua_newtable(L);
|
||||
|
Loading…
Reference in New Issue
Block a user