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 2018/08/27 07:10:16 UTC

[trafficserver] 02/03: Fix sending generated STREAM frame

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

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 45dd5aecb93d3a6d809a2ed0ae3f6e7badb0bbec
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Aug 27 15:34:12 2018 +0900

    Fix sending generated STREAM frame
---
 iocore/net/QUICNetVConnection.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index af40685..a44f136 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -1260,9 +1260,6 @@ QUICNetVConnection::_packetize_frames(QUICEncryptionLevel level, uint64_t max_pa
   frame = this->_stream_manager->generate_frame(level, this->_remote_flow_controller->credit(), max_frame_size);
   while (frame) {
     ++frame_count;
-    if (++this->_stream_frames_sent % MAX_CONSECUTIVE_STREAMS == 0) {
-      break;
-    }
     if (frame->type() == QUICFrameType::STREAM) {
       int ret = this->_remote_flow_controller->update(this->_stream_manager->total_offset_sent());
       QUICFCDebug("[REMOTE] %" PRIu64 "/%" PRIu64, this->_remote_flow_controller->current_offset(),
@@ -1271,6 +1268,10 @@ QUICNetVConnection::_packetize_frames(QUICEncryptionLevel level, uint64_t max_pa
     }
     this->_store_frame(buf, len, max_frame_size, std::move(frame));
 
+    if (++this->_stream_frames_sent % MAX_CONSECUTIVE_STREAMS == 0) {
+      break;
+    }
+
     frame = this->_stream_manager->generate_frame(level, this->_remote_flow_controller->credit(), max_frame_size);
   }