diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-26 14:57:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-26 14:57:09 +0200 |
commit | 87a85e347ea0c997cc9c0fb81901158812b17be8 (patch) | |
tree | 77f141674d844f679b2768e9dfe52dcb208b0f55 /net/server_epoll.lua | |
parent | 47963b59da90be2d851ae873f3d5ba8796f786b9 (diff) | |
download | prosody-87a85e347ea0c997cc9c0fb81901158812b17be8.tar.gz prosody-87a85e347ea0c997cc9c0fb81901158812b17be8.zip |
net.server_epoll: Include errno in log messages
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 9751fa45..04922f6e 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -264,9 +264,9 @@ function interface:add(r, w) end if r == nil then r = self._wantread; end if w == nil then w = self._wantwrite; end - local ok, err = poll:add(fd, r, w); + local ok, err, errno = poll:add(fd, r, w); if not ok then - log("error", "Could not register %s: %s", self, err); + log("error", "Could not register %s: %s(%d)", self, err); return ok, err; end self._wantread, self._wantwrite = r, w; @@ -282,9 +282,9 @@ function interface:set(r, w) end if r == nil then r = self._wantread; end if w == nil then w = self._wantwrite; end - local ok, err = poll:set(fd, r, w); + local ok, err, errno = poll:set(fd, r, w); if not ok then - log("error", "Could not update poller state %s: %s", self, err); + log("error", "Could not update poller state %s: %s(%d)", self, err, errno); return ok, err; end self._wantread, self._wantwrite = r, w; @@ -299,9 +299,9 @@ function interface:del() if fds[fd] ~= self then return nil, "unregistered fd"; end - local ok, err = poll:del(fd); + local ok, err, errno = poll:del(fd); if not ok then - log("error", "Could not unregister %s: %s", self, err); + log("error", "Could not unregister %s: %s(%d)", self, err, errno); return ok, err; end self._wantread, self._wantwrite = nil, nil; |