diff options
author | Kim Alvefur <zash@zash.se> | 2019-09-29 15:36:23 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-09-29 15:36:23 +0200 |
commit | 4ab02db7350394798bc924f8eeb341677d3504aa (patch) | |
tree | 56282b44e432925c30188279714daffba027fdba /net/server_epoll.lua | |
parent | 06c7fc85beca2329da24aa901bb623ea28d9d0f1 (diff) | |
download | prosody-4ab02db7350394798bc924f8eeb341677d3504aa.tar.gz prosody-4ab02db7350394798bc924f8eeb341677d3504aa.zip |
net.server_epoll: Handle read size argument to link
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 250ce4d0..c2eb7b1c 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -791,7 +791,7 @@ local function watchfd(fd, onreadable, onwritable) end; -- Dump all data from one connection into another -local function link(from, to) +local function link(from, to, read_size) from:debug("Linking to %s", to.id); from.listeners = setmetatable({ onincoming = function (_, data) @@ -804,6 +804,7 @@ local function link(from, to) from:resume(); end, }, {__index=to.listeners}); + from:set_mode(read_size); from:set(true, nil); to:set(nil, true); end |