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
3c15e85783
commit
dc9384dc7c
|
@ -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) {
|
int Client::quic_stream_close(int64_t stream_id, uint64_t app_error_code) {
|
||||||
auto s = static_cast<Http3Session *>(session.get());
|
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 -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue