dns.getaddrinfo: Return proper error messages
This commit is contained in:
parent
f871a29f27
commit
5874d47f55
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue