From df99fd96e2a6493c2527b7001a987596a3e9202e Mon Sep 17 00:00:00 2001 From: Radkesvat <134321679+radkesvat@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:12:47 +0300 Subject: [PATCH] small changes/settings --- tunnels/client/http2/helpers.h | 2 +- tunnels/client/http2/http2_client.c | 2 ++ tunnels/server/http2/http2_server.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tunnels/client/http2/helpers.h b/tunnels/client/http2/helpers.h index fc352053..c666911e 100644 --- a/tunnels/client/http2/helpers.h +++ b/tunnels/client/http2/helpers.h @@ -3,7 +3,7 @@ #include "types.h" #define MAX_CONCURRENT_STREAMS 0xffffffffu -#define MAX_CHILD_PER_STREAM 3 +#define MAX_CHILD_PER_STREAM 400 #define STATE(x) ((http2_client_state_t *)((x)->state)) #define CSTATE(x) ((void *)((((x)->line->chains_state)[self->chain_index]))) diff --git a/tunnels/client/http2/http2_client.c b/tunnels/client/http2/http2_client.c index bdf80d3e..17c70423 100644 --- a/tunnels/client/http2/http2_client.c +++ b/tunnels/client/http2/http2_client.c @@ -302,6 +302,8 @@ static int on_frame_recv_callback(nghttp2_session *session, tunnel_t *dest = stream->tunnel; remove_stream(con, stream); delete_http2_stream(stream); + CSTATE_MUT(fc) = NULL; + dest->downStream(dest, fc); return 0; diff --git a/tunnels/server/http2/http2_server.c b/tunnels/server/http2/http2_server.c index 8ecb4bd1..2e52ec87 100644 --- a/tunnels/server/http2/http2_server.c +++ b/tunnels/server/http2/http2_server.c @@ -193,6 +193,8 @@ static int on_frame_recv_callback(nghttp2_session *session, tunnel_t *dest = stream->tunnel; remove_stream(con, stream); delete_http2_stream(stream); + CSTATE_MUT(fc) = NULL; + dest->upStream(dest, fc); return 0; } @@ -403,6 +405,7 @@ static inline void downStream(tunnel_t *self, context_t *c) nghttp2_session_set_stream_user_data(con->session, stream->stream_id, NULL); remove_stream(con, stream); delete_http2_stream(stream); + CSTATE_MUT(c) = NULL; while (trySendResponse(self, con, 0, NULL, NULL)) if (!ISALIVE(c))