Compile with the latest ngtcp2
This commit is contained in:
parent
10c9d917ad
commit
bc8f88f5fa
|
@ -108,9 +108,15 @@ int Client::quic_acked_stream_data_offset(int64_t stream_id, size_t datalen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int stream_close(ngtcp2_conn *conn, int64_t stream_id, uint64_t app_error_code,
|
int stream_close(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id,
|
||||||
void *user_data, void *stream_user_data) {
|
uint64_t app_error_code, void *user_data,
|
||||||
|
void *stream_user_data) {
|
||||||
auto c = static_cast<Client *>(user_data);
|
auto c = static_cast<Client *>(user_data);
|
||||||
|
|
||||||
|
if (!(flags & NGTCP2_STREAM_CLOSE_FLAG_APP_ERROR_CODE_SET)) {
|
||||||
|
app_error_code = NGHTTP3_H3_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (c->quic_stream_close(stream_id, app_error_code) != 0) {
|
if (c->quic_stream_close(stream_id, app_error_code) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,10 +306,15 @@ int Http3Upstream::recv_stream_data(uint32_t flags, int64_t stream_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int stream_close(ngtcp2_conn *conn, int64_t stream_id, uint64_t app_error_code,
|
int stream_close(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id,
|
||||||
void *user_data, void *stream_user_data) {
|
uint64_t app_error_code, void *user_data,
|
||||||
|
void *stream_user_data) {
|
||||||
auto upstream = static_cast<Http3Upstream *>(user_data);
|
auto upstream = static_cast<Http3Upstream *>(user_data);
|
||||||
|
|
||||||
|
if (!(flags & NGTCP2_STREAM_CLOSE_FLAG_APP_ERROR_CODE_SET)) {
|
||||||
|
app_error_code = NGHTTP3_H3_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (upstream->stream_close(stream_id, app_error_code) != 0) {
|
if (upstream->stream_close(stream_id, app_error_code) != 0) {
|
||||||
return NGTCP2_ERR_CALLBACK_FAILURE;
|
return NGTCP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue