Commit e45b10ca authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Remove error handling which does not happen

parent 330fe124
...@@ -1019,7 +1019,9 @@ int Client::write_quic() { ...@@ -1019,7 +1019,9 @@ int Client::write_quic() {
auto should_break = false; auto should_break = false;
switch (nwrite) { switch (nwrite) {
case NGTCP2_ERR_STREAM_DATA_BLOCKED: 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; return 0;
} }
...@@ -1028,13 +1030,6 @@ int Client::write_quic() { ...@@ -1028,13 +1030,6 @@ int Client::write_quic() {
} }
should_break = true; should_break = true;
break; 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: case NGTCP2_ERR_WRITE_STREAM_MORE:
assert(ndatalen > 0); assert(ndatalen > 0);
if (s->add_write_offset(stream_id, ndatalen) != 0) { if (s->add_write_offset(stream_id, ndatalen) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment