Software /
code /
prosody
Changeset
7551:838212918f11
net.server_epoll: Rename arguments and varibles for consistensy
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Aug 2016 20:55:07 +0200 |
parents | 7550:8c2bc1b6d84a |
children | 7552:f1ae74ebeb81 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Wed Aug 10 20:47:40 2016 +0200 +++ b/net/server_epoll.lua Wed Aug 10 20:55:07 2016 +0200 @@ -447,21 +447,21 @@ 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)