Comparison

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
comparison
equal deleted inserted replaced
7551:838212918f11 7552:f1ae74ebeb81
214 op = "del"; 214 op = "del";
215 elseif not currentflags then 215 elseif not currentflags then
216 op = "add"; 216 op = "add";
217 end 217 end
218 local ok, err = epoll.ctl(op, fd, flags); 218 local ok, err = epoll.ctl(op, fd, flags);
219 log("debug", "epoll_ctl(%q, %d, %q) -> %s" .. (err and ", %q" or ""),
220 op, fd, flags or "", tostring(ok), err);
219 if not ok then return ok, err end 221 if not ok then return ok, err end
220 self._flags = flags; 222 self._flags = flags;
221 return true; 223 return true;
222 end 224 end
223 225