MINOR: quic: Do not modify a marked as consumed datagram
Mark the datagrams as consumed at the very last time.
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index e1dcd62..0f9987e 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -5397,14 +5397,14 @@
break;
} while (pos < end);
- /* Mark this datagram as consumed */
- HA_ATOMIC_STORE(&dgram->buf, NULL);
-
/* Increasing the received bytes counter by the UDP datagram length
* if this datagram could be associated to a connection.
*/
if (dgram->qc)
dgram->qc->rx.bytes += dgram->len;
+
+ /* Mark this datagram as consumed */
+ HA_ATOMIC_STORE(&dgram->buf, NULL);
}
return t;