Commit e315b49c authored by jan.koester's avatar jan.koester
Browse files

test



Co-authored-by: default avatarCopilot <copilot@github.com>
parent 851841c0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3314,6 +3314,15 @@ void quic::processStreamFrame(const uint8_t* data, size_t len, size_t& offset) {
    
    if (offset + stream_len > len) return;
    
    // Ignore data for streams that were already fully closed (both FIN sent
    // and received).  Retransmitted packets for erased streams would otherwise
    // auto-create a new Stream object, inflating _data_recv and potentially
    // re-dispatching stale data to the application.
    if (_closed_streams.count(stream_id)) {
        offset += stream_len;
        return;
    }
    
    // Get or create stream
    auto& stream = _streams[stream_id];
    stream.stream_id = stream_id;
@@ -5026,6 +5035,7 @@ size_t quic::sendStreamData(uint64_t stream_id, const uint8_t* data, size_t len,
        if (stream.recv_fin) {
            bool peer_bidi = _is_server ? (stream_id % 4 == 0) : (stream_id % 4 == 1);
            bool peer_uni  = _is_server ? (stream_id % 4 == 2) : (stream_id % 4 == 3);
            _closed_streams.insert(stream_id);
            _streams.erase(stream_id);
            if (peer_bidi) {
                _max_streams_bidi_local++;
@@ -5422,6 +5432,7 @@ void quic::closeStream(uint64_t stream_id) {
    if (stream.recv_fin && stream.send_fin) {
        bool peer_bidi = _is_server ? (stream_id % 4 == 0) : (stream_id % 4 == 1);
        bool peer_uni  = _is_server ? (stream_id % 4 == 2) : (stream_id % 4 == 3);
        _closed_streams.insert(stream_id);
        _streams.erase(it);
        if (peer_bidi) {
            _max_streams_bidi_local++;
+1 −0
Original line number Diff line number Diff line
@@ -888,6 +888,7 @@ namespace netplus {

		// Streams
		std::map<uint64_t, Stream> _streams;
		std::set<uint64_t> _closed_streams;  // IDs of fully-closed streams (prevent resurrection)
		uint64_t _next_stream_id_bidi = 0;
		uint64_t _next_stream_id_uni = 2;