From 00903267a24250458774e3703a82ddec6a2ee449 Mon Sep 17 00:00:00 2001 From: iiztp Date: Wed, 8 Jan 2025 19:01:28 +0100 Subject: [PATCH] Resolve comments --- src/core/datagram.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/datagram.c b/src/core/datagram.c index d9524450cc..4786fa1280 100644 --- a/src/core/datagram.c +++ b/src/core/datagram.c @@ -597,7 +597,12 @@ QuicDatagramCancelBlocked( { QUIC_DATAGRAM* Datagram = &Connection->Datagram; QUIC_SEND_REQUEST** SendQueue = &Datagram->SendQueue; - while (*SendQueue != NULL) { + + if (*SendQueue == NULL) { + return; + } + + do { if ((*SendQueue)->Flags & QUIC_SEND_FLAG_CANCEL_ON_BLOCKED) { QUIC_SEND_REQUEST* SendRequest = *SendQueue; if (Datagram->PrioritySendQueueTail == &SendRequest->Next) { @@ -608,7 +613,8 @@ QuicDatagramCancelBlocked( } else { SendQueue = &((*SendQueue)->Next); } - } + } while (*SendQueue != NULL); + Datagram->SendQueueTail = SendQueue; if (Datagram->SendQueue != NULL) {