From e45b10ca20e71a58ad5d3acff1f77ec526153f40 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 25 Aug 2019 10:43:33 +0900 Subject: [PATCH] Remove error handling which does not happen --- src/h2load_quic.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index aad45276..87c519b3 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -1019,7 +1019,9 @@ int Client::write_quic() { auto should_break = false; switch (nwrite) { case NGTCP2_ERR_STREAM_DATA_BLOCKED: - if (ngtcp2_conn_get_max_data_left(quic.conn) == 0) { + case NGTCP2_ERR_STREAM_SHUT_WR: + if (nwrite == NGTCP2_ERR_STREAM_DATA_BLOCKED && + ngtcp2_conn_get_max_data_left(quic.conn) == 0) { return 0; } @@ -1028,13 +1030,6 @@ int Client::write_quic() { } should_break = true; break; - case NGTCP2_ERR_EARLY_DATA_REJECTED: - case NGTCP2_ERR_STREAM_SHUT_WR: - case NGTCP2_ERR_STREAM_NOT_FOUND: // This means that stream is - // closed. - assert(0); - // TODO Perhaps, close stream or this should not happen? - break; case NGTCP2_ERR_WRITE_STREAM_MORE: assert(ndatalen > 0); if (s->add_write_offset(stream_id, ndatalen) != 0) {