Loading src/event/epoll.cpp +3 −10 Changes for src/event/epoll.cpp: 3 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ namespace netplus { } } // No need to re-arm with level-triggered epoll // Guard will re-arm on return // Post-handshake: if the socket has a framing // callback, invoke it with stream_id=0 to produce Loading Loading @@ -479,11 +479,8 @@ namespace netplus { } } // With EPOLLONESHOT, re-arm is needed; batching sends reduces syscalls significantly // Send blocked, guard will re-arm with EPOLLOUT if (sendBlockedWouldBlock && c->SendData.pos < c->SendData.size()) { // More data queued but socket is full - need to wait for EPOLLOUT rearm.disarm(); setpollEventsFd(fd, EPOLLOUT | EPOLLRDHUP | EPOLLONESHOT); return; } Loading @@ -497,11 +494,7 @@ namespace netplus { } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { int ev = EPOLLIN | EPOLLRDHUP | EPOLLONESHOT; if (c->csock->hasPendingWrite() || c->SendData.pos < c->SendData.size()) ev |= EPOLLOUT; rearm.disarm(); setpollEventsFd(fd, ev); // Guard will re-arm on return return; } needClose = true; Loading Loading
src/event/epoll.cpp +3 −10 Changes for src/event/epoll.cpp: 3 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ namespace netplus { } } // No need to re-arm with level-triggered epoll // Guard will re-arm on return // Post-handshake: if the socket has a framing // callback, invoke it with stream_id=0 to produce Loading Loading @@ -479,11 +479,8 @@ namespace netplus { } } // With EPOLLONESHOT, re-arm is needed; batching sends reduces syscalls significantly // Send blocked, guard will re-arm with EPOLLOUT if (sendBlockedWouldBlock && c->SendData.pos < c->SendData.size()) { // More data queued but socket is full - need to wait for EPOLLOUT rearm.disarm(); setpollEventsFd(fd, EPOLLOUT | EPOLLRDHUP | EPOLLONESHOT); return; } Loading @@ -497,11 +494,7 @@ namespace netplus { } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { int ev = EPOLLIN | EPOLLRDHUP | EPOLLONESHOT; if (c->csock->hasPendingWrite() || c->SendData.pos < c->SendData.size()) ev |= EPOLLOUT; rearm.disarm(); setpollEventsFd(fd, ev); // Guard will re-arm on return return; } needClose = true; Loading