Diff

net/server_epoll.lua @ 7552:f1ae74ebeb81

net.server_epoll: Log epoll_ctl() calls and return values
author Kim Alvefur <zash@zash.se>
date Wed, 10 Aug 2016 20:55:31 +0200
parent 7551:838212918f11
child 7553:4f3e4a092348
line wrap: on
line diff
--- a/net/server_epoll.lua	Wed Aug 10 20:55:07 2016 +0200
+++ b/net/server_epoll.lua	Wed Aug 10 20:55:31 2016 +0200
@@ -216,6 +216,8 @@
 		op = "add";
 	end
 	local ok, err = epoll.ctl(op, fd, flags);
+	log("debug", "epoll_ctl(%q, %d, %q) -> %s" .. (err and ", %q" or ""),
+		op, fd, flags or "", tostring(ok), err);
 	if not ok then return ok, err end
 	self._flags = flags;
 	return true;