Only count STREAM data as bytes_total

This commit is contained in:
Tatsuhiro Tsujikawa 2019-11-20 23:40:21 +09:00
parent b3fbebed55
commit c591ab5e6f
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ int recv_stream_data(ngtcp2_conn *conn, int64_t stream_id, int fin,
int Client::quic_recv_stream_data(int64_t stream_id, int fin,
const uint8_t *data, size_t datalen) {
if (worker->current_phase == Phase::MAIN_DURATION) {
worker->stats.bytes_total += datalen;
}
auto s = static_cast<Http3Session *>(session.get());
auto nconsumed = s->read_stream(stream_id, data, datalen, fin);
if (nconsumed == -1) {