Loading src/event/epoll.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -334,7 +334,14 @@ namespace netplus { if ((events & EPOLLIN) && !needClose) { try { buffer primeBuf(BLOCKSIZE); c->slots[0].csock->prime_recv(primeBuf, 0); size_t n = c->slots[0].csock->prime_recv(primeBuf, 0); if (n > 0) { // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. c->lasteventime = time(nullptr); } } catch (NetException& e) { if (e.getErrorType() != NetException::Note) throw; } Loading @@ -349,6 +356,7 @@ namespace netplus { if (c->slots[0].csock->hasPendingWrite()) { try { c->slots[0].csock->flush_out(); c->lasteventime = time(nullptr); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { rearm.disarm(); Loading src/event/iocp.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,11 @@ namespace netplus { reinterpret_cast<const uint8_t*>(buf->data.buf), bytes ); // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. owner->lasteventime = time(nullptr); } if (!ok) { Loading Loading @@ -622,6 +627,9 @@ namespace netplus { if (!owner->slots[0].csock->getHandshakeDone()) { owner->slots[0].WritePending.store(false); owner->slots[0].csock->setPendingWrite(false); // Handshake bytes count as progress too -- see the OP_READ // side's identical comment above. owner->lasteventime = time(nullptr); std::lock_guard<std::recursive_mutex> hsLock(owner->event_mutex); Loading src/event/kqueue.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -486,7 +486,14 @@ namespace netplus { recvBuf.size = BLOCKSIZE; try { size_t n = c->slots[0].csock->prime_recv(recvBuf, 0); if (n > 0) gotRawData = true; if (n > 0) { gotRawData = true; // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. c->lasteventime = time(nullptr); } } catch (NetException& e) { if (e.getErrorType() != NetException::Note) throw; } Loading @@ -501,6 +508,7 @@ namespace netplus { if (c->slots[0].csock->hasPendingWrite()) { try { c->slots[0].csock->flush_out(); c->lasteventime = time(nullptr); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { // Guard auto-detects hasPendingWrite and arms WRITE Loading Loading
src/event/epoll.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -334,7 +334,14 @@ namespace netplus { if ((events & EPOLLIN) && !needClose) { try { buffer primeBuf(BLOCKSIZE); c->slots[0].csock->prime_recv(primeBuf, 0); size_t n = c->slots[0].csock->prime_recv(primeBuf, 0); if (n > 0) { // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. c->lasteventime = time(nullptr); } } catch (NetException& e) { if (e.getErrorType() != NetException::Note) throw; } Loading @@ -349,6 +356,7 @@ namespace netplus { if (c->slots[0].csock->hasPendingWrite()) { try { c->slots[0].csock->flush_out(); c->lasteventime = time(nullptr); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { rearm.disarm(); Loading
src/event/iocp.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,11 @@ namespace netplus { reinterpret_cast<const uint8_t*>(buf->data.buf), bytes ); // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. owner->lasteventime = time(nullptr); } if (!ok) { Loading Loading @@ -622,6 +627,9 @@ namespace netplus { if (!owner->slots[0].csock->getHandshakeDone()) { owner->slots[0].WritePending.store(false); owner->slots[0].csock->setPendingWrite(false); // Handshake bytes count as progress too -- see the OP_READ // side's identical comment above. owner->lasteventime = time(nullptr); std::lock_guard<std::recursive_mutex> hsLock(owner->event_mutex); Loading
src/event/kqueue.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -486,7 +486,14 @@ namespace netplus { recvBuf.size = BLOCKSIZE; try { size_t n = c->slots[0].csock->prime_recv(recvBuf, 0); if (n > 0) gotRawData = true; if (n > 0) { gotRawData = true; // Handshake bytes count as progress too -- a slow // multi-round-trip TLS handshake shouldn't look idle // to reapIdleConnections() just because it hasn't // reached application data yet. c->lasteventime = time(nullptr); } } catch (NetException& e) { if (e.getErrorType() != NetException::Note) throw; } Loading @@ -501,6 +508,7 @@ namespace netplus { if (c->slots[0].csock->hasPendingWrite()) { try { c->slots[0].csock->flush_out(); c->lasteventime = time(nullptr); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) { // Guard auto-detects hasPendingWrite and arms WRITE Loading