mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-24 04:01:07 +03:00
Back out "BufQueue::trimAtMost"
Summary: Original commit changeset: 0ace20d07d8b Original Phabricator Diff: D46776767 Reviewed By: lnicco Differential Revision: D47007928 fbshipit-source-id: 6c8760683692d1b50168f8f5d82d79c98ebe7c31
This commit is contained in:
committed by
Facebook GitHub Bot
parent
69ff02e35f
commit
711f0e30fc
@@ -840,22 +840,20 @@ QuicFrame parseFrame(
|
||||
throw QuicTransportException(
|
||||
"Invalid frame-type field", TransportErrorCode::FRAME_ENCODING_ERROR);
|
||||
}
|
||||
queue.trimStart(frameTypeInt->second);
|
||||
queue.trimStart(cursor - queue.front());
|
||||
bool consumedQueue = false;
|
||||
bool error = false;
|
||||
SCOPE_EXIT {
|
||||
if (consumedQueue || error) {
|
||||
return;
|
||||
}
|
||||
if (!queue.empty()) {
|
||||
queue.trimStart(cursor - queue.front());
|
||||
}
|
||||
queue.trimStart(cursor - queue.front());
|
||||
};
|
||||
// trimStart() may have free'd the IOBuf;
|
||||
folly::IOBuf emptyBuf{};
|
||||
cursor.reset(queue.empty() ? &emptyBuf : queue.front());
|
||||
cursor.reset(queue.front());
|
||||
FrameType frameType = static_cast<FrameType>(frameTypeInt->first);
|
||||
try {
|
||||
try
|
||||
|
||||
{
|
||||
switch (frameType) {
|
||||
case FrameType::PADDING:
|
||||
return QuicFrame(decodePaddingFrame(cursor));
|
||||
|
||||
Reference in New Issue
Block a user