aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-29 15:36:23 +0200
committerKim Alvefur <zash@zash.se>2019-09-29 15:36:23 +0200
commit5eea3358fd7f8ca8b0edb36769b393bb0f1423ca (patch)
tree56282b44e432925c30188279714daffba027fdba /net
parent4f848e3ea0c92e545b9d162d55959e4f281aca70 (diff)
downloadprosody-5eea3358fd7f8ca8b0edb36769b393bb0f1423ca.tar.gz
prosody-5eea3358fd7f8ca8b0edb36769b393bb0f1423ca.zip
net.server_epoll: Handle read size argument to link
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua3
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