aboutsummaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udp.c b/src/udp.c
index 6e0de9f..2a51d1c 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -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);