login

<     >

2023-08-19 10:49:54 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

tcp: stop reporting epoll_wait() errors

diff --git a/lib/ludweb/tcp.lua b/lib/ludweb/tcp.lua
index 371eed7..f0b8b3d 100644
--- a/lib/ludweb/tcp.lua
+++ b/lib/ludweb/tcp.lua
@@ -121,13 +121,6 @@ function TCP:run()
     local running = true
     while running do
         nfds = C.epoll_wait(efd, evs, curfds, -1)
-        if nfds < 0 then
-            local errno = ffi.errno()
-            local ts = os.date("%F %T")
-            local errs = {[4]="EINTR", [9]="EBADF", [14]="EFAULT", [22]="EINVAL"}
-            local msg = "[%s] epoll_wait() failed with %s\n"
-            io.stderr:write(msg:format(ts, errs[errno]))
-        end
         -- the loop below will run zero times if nfds < 1, ignoring errors
         for n = 0, nfds-1 do
             if evs[n].data.fd == self.sockfd then