From a60a34331b060580a16fb31f425b8dfa9de766f9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 4 Apr 2020 16:10:04 +0900 Subject: [PATCH] Revert "Ensure complete packet is written" This reverts commit c19046b09f8e66713f0e067f986ed92d676eb6b6. --- src/h2load_quic.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index 1e29d4d9..86b6f074 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -647,13 +647,7 @@ int Client::write_quic() { case NGTCP2_ERR_STREAM_SHUT_WR: if (nwrite == NGTCP2_ERR_STREAM_DATA_BLOCKED && ngtcp2_conn_get_max_data_left(quic.conn) == 0) { - /* Call ngtcp2_conn_writev_stream to ensure that a complete - packet is written to the buffer. */ - nwrite = ngtcp2_conn_writev_stream( - quic.conn, &ps.path, buf.data(), quic.max_pktlen, nullptr, - NGTCP2_WRITE_STREAM_FLAG_NONE, /* stream_id = */ 0, /* fin = */ 0, - nullptr, 0, timestamp(worker->loop)); - break; + return 0; } if (s->block_stream(stream_id) != 0) { @@ -668,10 +662,8 @@ int Client::write_quic() { continue; } - if (nwrite < 0) { - quic.last_error = quic::err_transport(nwrite); - return -1; - } + quic.last_error = quic::err_transport(nwrite); + return -1; } quic_restart_pkt_timer();