Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

[Doubt] Updating epoll interest list Upon EAGAIN/EWOULDBLOCK while sending #8

@PrashanthaTP

Description

@PrashanthaTP

Inside HandleEpollEvent function,
Upon EPOLLOUT, if EAGAIN/EWOULDBLOCK occurs, the client fd is being readded to epoll list,
but shouldn't it be just modified as done while doing recv?

EPOLLOUT

if (errno == EAGAIN || errno == EWOULDBLOCK) { // retry
control_epoll_event(epoll_fd, EPOLL_CTL_ADD, fd, EPOLLOUT, response);

EPOLLIN

} else {
if (errno == EAGAIN || errno == EWOULDBLOCK) { // retry
request->fd = fd;
control_epoll_event(epoll_fd, EPOLL_CTL_MOD, fd, EPOLLIN, request);

Also is it required to do this? or can we just skip this part without doing any modification to interest list and retry when EAGAIN/EWOULDBLOCK happens?

Thanks in advance,

--
Thanks a lot for opensourcing this project :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions