net.server_epoll: Fix write signal handling in watchfd API
authorKim Alvefur <zash@zash.se>
Sat, 15 Sep 2018 14:20:01 +0200
changeset 9322 7c954c75b6ac
parent 9321 3429006518bf
child 9323 8cc498cb0df7
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
--- a/net/server_epoll.lua	Sat Sep 15 01:17:53 2018 +0200
+++ b/net/server_epoll.lua	Sat Sep 15 14:20:01 2018 +0200
@@ -602,11 +602,11 @@
 	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 @@
 		end;
 		-- Otherwise it'll need to be something LuaSocket-compatible
 	end
-	conn:add(onreadable, onwriteable);
+	conn:add(onreadable, onwritable);
 	return conn;
 end;