You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2022/07/07 02:27:54 UTC

[trafficserver] 06/12: Fix double counting the received bytes

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quiche
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 5e1e6c06fba72a6f013c586c02d2f59d108fafb3
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Jun 15 15:06:02 2022 +0900

    Fix double counting the received bytes
---
 iocore/net/quic/QUICStream_quiche.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/quic/QUICStream_quiche.cc b/iocore/net/quic/QUICStream_quiche.cc
index 0f4d3b9d2..33ddd0224 100644
--- a/iocore/net/quic/QUICStream_quiche.cc
+++ b/iocore/net/quic/QUICStream_quiche.cc
@@ -62,8 +62,8 @@ QUICStreamImpl::receive_data(quiche_conn *quiche_con)
   ssize_t read_len = 0;
 
   while ((read_len = quiche_conn_stream_recv(quiche_con, this->_id, buf, sizeof(buf), &fin)) > 0) {
-    this->_received_bytes += read_len;
     this->_adapter->write(this->_received_bytes, buf, read_len, fin);
+    this->_received_bytes += read_len;
   }
 
   this->_adapter->encourge_read();