Software /
code /
prosody
Changeset
9384:5c8006ce8cb8
net.server_epoll: Include errno in log messages
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 14:57:09 +0200 |
parents | 9383:3260902a5b22 |
children | 9385:58fe099043ed |
files | net/server_epoll.lua |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Wed Sep 26 13:53:18 2018 +0200 +++ b/net/server_epoll.lua Wed Sep 26 14:57:09 2018 +0200 @@ -264,9 +264,9 @@ 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 @@ 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 @@ 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;