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.
This commit is contained in:
parent
53a860a5bf
commit
f7414700f4
|
@ -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<Http3Session *>(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;
|
||||
|
|
Loading…
Reference in New Issue