Call ngtcp2_ackfr_commit_ack inside conn_write_single_frame_pkt
@@ -2151,6 +2151,7 @@ static ssize_t conn_write_single_frame_pkt(ngtcp2_conn *conn, uint8_t *dest,
/* Do this when we are sure that there is no error. */
if (fr->type == NGTCP2_FRAME_ACK) {
+ ngtcp2_acktr_commit_ack(&pktns->acktr);
ngtcp2_acktr_add_ack(&pktns->acktr, hd.pkt_num, &fr->ack, ts,
1 /* ack_only */);
}
@@ -2200,8 +2201,6 @@ static ssize_t conn_write_protected_ack_pkt(ngtcp2_conn *conn, uint8_t *dest,
return spktlen;
}
- ngtcp2_acktr_commit_ack(acktr);
-
return spktlen;
}
