The boot server uses a disconnect handler which closes the fd, this
causes deleting the fd from the epoll watch list to fail with an EBADF
error. Since the fd was closed it was already removed from the epoll
watch list, so the failure is harmless, silence these errors getting logged
to the debug logs.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
status = epoll_ctl (loop->epoll_fd, EPOLL_CTL_DEL, source->fd, NULL);
- if (status < 0)
+ /*
+ * EBADF means that there was a disconnect handler, which has
+ * closed the fd, which is fine, do not log an error for this.
+ */
+ if (status < 0 && errno != EBADF)
ply_trace ("failed to delete fd %d from epoll watch list: %m", source->fd);
source->is_getting_polled = false;
}