mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-04-18 17:24:03 +03:00
Move the buf ownership check until after the error check
Summary: title Reviewed By: jbeshay Differential Revision: D72867911 fbshipit-source-id: a5a297fa6ac7ce5f3475ea4c2b5c37e3e628ad2a
This commit is contained in:
parent
dbd2360d9d
commit
d14872347d
@ -265,10 +265,10 @@ continuousMemoryBuildScheduleEncrypt(
|
||||
CHECK(scheduler.hasData());
|
||||
auto result =
|
||||
scheduler.scheduleFramesForPacket(std::move(pktBuilder), writableBytes);
|
||||
CHECK(connection.bufAccessor->ownsBuffer());
|
||||
if (result.hasError()) {
|
||||
return folly::makeUnexpected(result.error());
|
||||
}
|
||||
CHECK(connection.bufAccessor->ownsBuffer());
|
||||
auto& packet = result->packet;
|
||||
if (!packet || packet->packet.frames.empty()) {
|
||||
rollbackBuf();
|
||||
|
Loading…
x
Reference in New Issue
Block a user