aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 9808b8ea..57da4287 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -447,21 +447,21 @@ local function addserver(addr, port, listeners, pattern, tls)
end
-- COMPAT
-local function wrapclient(client, addr, port, listeners, mode, tls)
- local conn = setmetatable({
- conn = client;
+local function wrapclient(conn, addr, port, listeners, pattern, tls)
+ local client = setmetatable({
+ conn = conn;
created = gettime();
listeners = listeners;
- _pattern = mode;
+ _pattern = pattern;
writebuffer = {};
tls = tls;
onreadable = interface.onconnect;
onwriteable = interface.onconnect;
peer = { addr, port };
}, interface_mt);
- fds[conn:getfd()] = conn;
- conn:setflags(true, true);
- return conn;
+ fds[client:getfd()] = client;
+ client:setflags(false, true);
+ return client;
end
local function link(from, to)