Skip to content

Commit

Permalink
[TEMP] For debugging arm ci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Dec 30, 2024
1 parent 02c1802 commit 2f1edc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/quic/cid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ CID::CID() : ptr_(&cid_) {
CID::CID(const ngtcp2_cid& cid) : CID(cid.data, cid.datalen) {}

CID::CID(const uint8_t* data, size_t len) : CID() {
DCHECK_GE(len, kMinLength);
DCHECK_LE(len, kMaxLength);
ngtcp2_cid_init(&cid_, data, len);
}

CID::CID(const ngtcp2_cid* cid) : ptr_(cid) {
CHECK_NOT_NULL(cid);
DCHECK_GE(cid->datalen, kMinLength);
DCHECK_LE(cid->datalen, kMaxLength);
}

Expand Down
8 changes: 8 additions & 0 deletions src/quic/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,14 @@ struct Session::Impl final : public MemoryRetainer {
void* user_data,
void* stream_user_data) {
NGTCP2_CALLBACK_SCOPE(session)
// The callback will be invoked with datalen 0 if a zero-length
// stream frame with fin flag set is received. In that case, let's
// just ignore it.
// Per ngtcp2, the range of bytes that are being acknowledged here
// are `[offset, offset + datalen]` but we only really care about
// the datalen as our accounting does not track the offset and
// acknowledges should never come out of order here.
if (datalen == 0) return NGTCP2_SUCCESS;
return session->application().AcknowledgeStreamData(stream_id, datalen)
? NGTCP2_SUCCESS
: NGTCP2_ERR_CALLBACK_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion src/quic/streams.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ void Stream::Acknowledge(size_t datalen) {
DCHECK_GE(datalen, STAT_GET(Stats, max_offset_ack));
STAT_SET(Stats, max_offset_ack, datalen);

// // Consumes the given number of bytes in the buffer.
// Consumes the given number of bytes in the buffer.
outbound_->Acknowledge(datalen);
}

Expand Down

0 comments on commit 2f1edc8

Please sign in to comment.