diff options
Diffstat (limited to 'src/udp.c')
-rw-r--r-- | src/udp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -376,7 +376,8 @@ static int meth_setpeername(lua_State *L) { | |||
376 | /* make sure we try to connect only to the same family */ | 376 | /* make sure we try to connect only to the same family */ |
377 | connecthints.ai_family = udp->family; | 377 | connecthints.ai_family = udp->family; |
378 | if (connecting) { | 378 | if (connecting) { |
379 | err = inet_tryconnect(&udp->sock, address, port, tm, &connecthints); | 379 | err = inet_tryconnect(&udp->sock, &udp->family, address, |
380 | port, tm, &connecthints); | ||
380 | if (err) { | 381 | if (err) { |
381 | lua_pushnil(L); | 382 | lua_pushnil(L); |
382 | lua_pushstring(L, err); | 383 | lua_pushstring(L, err); |