Merge tryconnect6 into inet_tryconnect.

This commit is contained in:
Diego Nehab 2013-05-26 21:26:26 +08:00
parent 6d93fd7c8f
commit 427220c7b1
4 changed files with 29 additions and 16 deletions

View file

@ -376,7 +376,8 @@ static int meth_setpeername(lua_State *L) {
/* make sure we try to connect only to the same family */
connecthints.ai_family = udp->family;
if (connecting) {
err = inet_tryconnect(&udp->sock, address, port, tm, &connecthints);
err = inet_tryconnect(&udp->sock, &udp->family, address,
port, tm, &connecthints);
if (err) {
lua_pushnil(L);
lua_pushstring(L, err);