aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-15 14:20:01 +0200
committerKim Alvefur <zash@zash.se>2018-09-15 14:20:01 +0200
commite4b4c42416ab9768d59251b350cdd3242cdac57e (patch)
treedf77fdce933770eb553bd077aef0d564caf3ac0f /net/server_epoll.lua
parent110ce660d58c6c7bc07b83da513aa0ef30400ec7 (diff)
downloadprosody-e4b4c42416ab9768d59251b350cdd3242cdac57e.tar.gz
prosody-e4b4c42416ab9768d59251b350cdd3242cdac57e.zip
net.server_epoll: Fix write signal handling in watchfd API
The main loop calls :onwritable but here it was spelled :onwriteable
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 2bc7c658..c8e24d6b 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -602,11 +602,11 @@ local function addclient(addr, port, listeners, read_size, tls_ctx)
return client, conn;
end
-local function watchfd(fd, onreadable, onwriteable)
+local function watchfd(fd, onreadable, onwritable)
local conn = setmetatable({
conn = fd;
onreadable = onreadable;
- onwriteable = onwriteable;
+ onwritable = onwritable;
close = function (self)
self:del();
end
@@ -617,7 +617,7 @@ local function watchfd(fd, onreadable, onwriteable)
end;
-- Otherwise it'll need to be something LuaSocket-compatible
end
- conn:add(onreadable, onwriteable);
+ conn:add(onreadable, onwritable);
return conn;
end;