From 75272a817e9a6da4cbd42d698d576cc4f02d4917 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 23 Jan 2022 23:46:19 +0900 Subject: [PATCH] h2load: Fix ngtcp2 callback error code --- src/h2load_quic.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index a32b1d46..790b7207 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -120,7 +120,7 @@ int stream_close(ngtcp2_conn *conn, uint32_t flags, int64_t stream_id, } if (c->quic_stream_close(stream_id, app_error_code) != 0) { - return -1; + return NGTCP2_ERR_CALLBACK_FAILURE; } return 0; } @@ -140,7 +140,7 @@ int stream_reset(ngtcp2_conn *conn, int64_t stream_id, uint64_t final_size, void *stream_user_data) { auto c = static_cast(user_data); if (c->quic_stream_reset(stream_id, app_error_code) != 0) { - return -1; + return NGTCP2_ERR_CALLBACK_FAILURE; } return 0; } @@ -160,7 +160,7 @@ int stream_stop_sending(ngtcp2_conn *conn, int64_t stream_id, void *stream_user_data) { auto c = static_cast(user_data); if (c->quic_stream_stop_sending(stream_id, app_error_code) != 0) { - return -1; + return NGTCP2_ERR_CALLBACK_FAILURE; } return 0; }