Skip to content

Commit 44a50f8

Browse files
committed
src/socket.c: reuseaddr can be turned off by default for sockets that will connect
1 parent 83cc95a commit 44a50f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static lso_nargs_t lso_connect2(lua_State *L) {
889889
port = luaL_checkstring(L, -1);
890890
}
891891
} else {
892-
opts = *so_opts();
892+
opts = *so_opts(.sin_reuseaddr = 0);
893893
host = luaL_checkstring(L, 1);
894894
port = luaL_checkstring(L, 2);
895895
family = luaL_optinteger(L, 3, AF_INET);

0 commit comments

Comments
 (0)