Skip to content

Commit

Permalink
better progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Aug 24, 2023
1 parent a9078aa commit d0af2ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ MsQuicLibraryUninitialize(
//
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_CONN_ACTIVE] == 0);
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_CONN_CONNECTED] == 0);
// CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_STRM_ACTIVE] == 0); This is bad. Remember to uncomment once we fix the issue.
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_STRM_ACTIVE] == 0);
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH] == 0);
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_CONN_OPER_QUEUE_DEPTH] == 0);
CXPLAT_DBG_ASSERT(PerfCounters[QUIC_PERF_COUNTER_WORK_OPER_QUEUE_DEPTH] == 0);
Expand Down
1 change: 1 addition & 0 deletions src/core/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ typedef union QUIC_STREAM_FLAGS {
BOOLEAN ReceiveDataPending : 1; // Data (or FIN) is queued and ready for delivery.
BOOLEAN ReceiveCallPending : 1; // There is an uncompleted receive to the app.
BOOLEAN ReceiveCallActive : 1; // There is an active receive to the app.
BOOLEAN ReceiveClosedReliable : 1; // We closed the stream on the Recv side from a Reliable reset frame.
BOOLEAN SendDelayed : 1; // A delayed send is currently queued.

BOOLEAN HandleSendShutdown : 1; // Send shutdown complete callback delivered.
Expand Down
13 changes: 13 additions & 0 deletions src/core/stream_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,19 @@ QuicStreamProcessStreamFrame(
goto Error;
}

if (Stream->Flags.RemoteCloseResetReliable && Frame->Offset >= Stream->RecvMaxLength) {
//
// Ignore additional frames once we have enough data.
//
if (!Stream->Flags.ReceiveClosedReliable) {
Stream->Flags.ReceiveClosedReliable = TRUE;
QuicStreamRecvShutdown(Stream, FALSE, QUIC_ERROR_NO_ERROR);
QuicStreamTryCompleteShutdown(Stream);
}
Status = QUIC_STATUS_SUCCESS;
goto Error;
}

if (EndOffset > QUIC_VAR_INT_MAX) {
//
// Stream data cannot exceed VAR_INT_MAX because it's impossible
Expand Down

0 comments on commit d0af2ea

Please sign in to comment.