Loading src/crypto/tls.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -3004,7 +3004,14 @@ namespace netplus { size_t remaining = send_record.size() - send_off; buffer raw_buf((const char*)(send_record.data() + send_off), remaining); size_t sent = _socket->sendRaw(raw_buf, 0); size_t sent; try { sent = _socket->sendRaw(raw_buf, 0); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) return; // Socket busy (e.g. IOCP write pending), records stay queued throw; } send_off += sent; if (send_off < send_record.size()) { Loading src/event/iocp.cpp +20 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,26 @@ namespace netplus { owner->slots[0].WritePending.store(false); owner->slots[0].csock->setPendingWrite(false); // Drain any queued TLS records now that the write completed if (owner->slots[0].csock->hasPendingWrite()) { try { owner->slots[0].csock->flush_out(); } catch (NetException& e) { if (e.getErrorType() != NetException::Note) { try_cleanup_con(ev, st, owner, cs, tid); continue; } } catch (...) { try_cleanup_con(ev, st, owner, cs, tid); continue; } // If flush posted a new IOCP write, wait for its completion if (owner->slots[0].csock->hasPendingWrite()) { owner->slots[0].WritePending.store(true); continue; } } if (owner->slots[0].Closing.load()) { ev->DisconnectEvent(*owner, tid, 0); remove_con(st, cs); Loading Loading
src/crypto/tls.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -3004,7 +3004,14 @@ namespace netplus { size_t remaining = send_record.size() - send_off; buffer raw_buf((const char*)(send_record.data() + send_off), remaining); size_t sent = _socket->sendRaw(raw_buf, 0); size_t sent; try { sent = _socket->sendRaw(raw_buf, 0); } catch (NetException& e) { if (e.getErrorType() == NetException::Note) return; // Socket busy (e.g. IOCP write pending), records stay queued throw; } send_off += sent; if (send_off < send_record.size()) { Loading
src/event/iocp.cpp +20 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,26 @@ namespace netplus { owner->slots[0].WritePending.store(false); owner->slots[0].csock->setPendingWrite(false); // Drain any queued TLS records now that the write completed if (owner->slots[0].csock->hasPendingWrite()) { try { owner->slots[0].csock->flush_out(); } catch (NetException& e) { if (e.getErrorType() != NetException::Note) { try_cleanup_con(ev, st, owner, cs, tid); continue; } } catch (...) { try_cleanup_con(ev, st, owner, cs, tid); continue; } // If flush posted a new IOCP write, wait for its completion if (owner->slots[0].csock->hasPendingWrite()) { owner->slots[0].WritePending.store(true); continue; } } if (owner->slots[0].Closing.load()) { ev->DisconnectEvent(*owner, tid, 0); remove_con(st, cs); Loading