dns.getaddrinfo: Return proper error messages

This commit is contained in:
Florian Zeitz 2011-06-14 20:30:40 +02:00 committed by Sam Roberts
parent f871a29f27
commit 5874d47f55

View File

@ -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);