From 393317c42e9c75c87b6cd78303fd5157d0b2cea3 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 16 Sep 2019 13:28:18 +0900 Subject: [PATCH] Small adjustment of successful HTTP/3 error code Non-zero successful error code is a bit annoying because ngtcp2 does not know it. Enforcing successful application error code to 0 is a lot simpler. --- src/h2load_quic.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index e6f019c4..445a005e 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -159,7 +159,8 @@ int stream_close(ngtcp2_conn *conn, int64_t stream_id, uint64_t app_error_code, int Client::quic_stream_close(int64_t stream_id, uint64_t app_error_code) { auto s = static_cast(session.get()); - if (s->close_stream(stream_id, app_error_code) != 0) { + if (s->close_stream(stream_id, app_error_code == 0 ? NGHTTP3_HTTP_NO_ERROR + : app_error_code) != 0) { return -1; } return 0;