Epoll: Handle server side read errors

Models that done for clients.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-09-02 12:59:47 +01:00
1 parent 741729de08
commit 05e9a9caf4
1 file changed
+2 -2
+2 -2
View File
@@ -3010,13 +3010,13 @@ coap_io_do_epoll_lkd(coap_context_t *ctx, struct epoll_event *events, size_t nev
if (sock->endpoint) {
coap_endpoint_t *endpoint = sock->endpoint;
if ((sock->flags & COAP_SOCKET_WANT_READ) &&
(events[j].events & EPOLLIN)) {
(events[j].events & (EPOLLIN|EPOLLERR|EPOLLHUP|EPOLLRDHUP))) {
sock->flags |= COAP_SOCKET_CAN_READ;
coap_read_endpoint(endpoint->context, endpoint, now);
}
if ((sock->flags & COAP_SOCKET_WANT_WRITE) &&
(events[j].events & EPOLLOUT)) {
(events[j].events & (EPOLLOUT|EPOLLERR|EPOLLHUP|EPOLLRDHUP))) {
/*
* Need to update this to EPOLLIN as EPOLLOUT will normally always
* be true causing epoll_wait to return early