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 | 341cb9cc54b2555e9313f7613e7f389c1352bc51 (patch) | |
tree | 77f141674d844f679b2768e9dfe52dcb208b0f55 | |
parent | 83f334145242d180bd1578566de68dc16a956dff (diff) | |
download | prosody-341cb9cc54b2555e9313f7613e7f389c1352bc51.tar.gz prosody-341cb9cc54b2555e9313f7613e7f389c1352bc51.zip |
net.server_epoll: Include errno in log messages
-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; |