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))