From a39eb7be8fa8d8242ae2a7ef70c858b836d336cf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 15 Sep 2018 14:20:01 +0200 Subject: net.server_epoll: Fix write signal handling in watchfd API The main loop calls :onwritable but here it was spelled :onwriteable --- net/server_epoll.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net') 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; -- cgit v1.2.3