aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index d6b09de3..0d04f6ee 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -969,12 +969,12 @@ local function addclient(addr, port, listeners, read_size, tls_ctx, typ, extra)
if not conn then return conn, err; end
local ok, err = conn:settimeout(0);
if not ok then return ok, err; end
+ local client = wrapsocket(conn, nil, read_size, listeners, tls_ctx, extra)
if cfg.tcp_fastopen then
- pcall(conn.setoption, conn, "tcp-fastopen-connect", 1);
+ client:setoption("tcp-fastopen-connect", 1);
end
local ok, err = conn:setpeername(addr, port);
if not ok and err ~= "timeout" then return ok, err; end
- local client = wrapsocket(conn, nil, read_size, listeners, tls_ctx, extra)
client:updatenames();
local ok, err = client:init();
if not client.peername then