MINOR: quic: Do not modify a marked as consumed datagram

Mark the datagrams as consumed at the very last time.
This commit is contained in:
Frédéric Lécaille 2022-02-02 09:41:27 +01:00 committed by Amaury Denoyelle
parent 8de3eff8f7
commit 841bf5e7f4

View File

@ -5397,14 +5397,14 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state)
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;