mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-27 01:07:10 +03:00
Epoll: Handle server side read errors
Models that done for clients.
This commit is contained in:
1 parent
741729de08
commit
05e9a9caf4
1 file changed
+2
-2
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user