diff --git a/tunnels/client/http2/http2_client.c b/tunnels/client/http2/http2_client.c index 224f21b7..a9977af5 100644 --- a/tunnels/client/http2/http2_client.c +++ b/tunnels/client/http2/http2_client.c @@ -224,7 +224,9 @@ static int on_data_chunk_recv_callback(nghttp2_session *session, stream_data->payload = gdata_buf; stream_data->src_io = con->io; stream->tunnel->downStream(stream->tunnel, stream_data); - continue; + + if (nghttp2_session_get_stream_user_data(session, stream_id)) + continue; } break; } diff --git a/tunnels/client/protobuf/protobuf_client.c b/tunnels/client/protobuf/protobuf_client.c index b3770f23..f7197861 100644 --- a/tunnels/client/protobuf/protobuf_client.c +++ b/tunnels/client/protobuf/protobuf_client.c @@ -18,7 +18,6 @@ #define CSTATE_MUT(x) ((x)->line->chains_state)[self->chain_index] #define ISALIVE(x) (CSTATE(x) != NULL) - typedef struct protobuf_client_state_s { @@ -128,7 +127,7 @@ static inline void downStream(tunnel_t *self, context_t *c) LOGE("ProtoBufServer: rejected, size too large"); DISCARD_CONTEXT(c); cleanup(cstate); - CSTATE_MUT(c) = NULL; + CSTATE_MUT(c) = NULL; self->dw->downStream(self->dw, newFinContext(c->line)); self->up->upStream(self->up, newFinContext(c->line)); diff --git a/tunnels/server/http2/helpers.h b/tunnels/server/http2/helpers.h index 5846367d..2622f60e 100644 --- a/tunnels/server/http2/helpers.h +++ b/tunnels/server/http2/helpers.h @@ -73,8 +73,6 @@ create_http2_stream(http2_server_con_state_t *con, line_t *this_line, tunnel_t * static void delete_http2_stream(http2_server_child_con_state_t *stream) { - - stream->line->chains_state[stream->tunnel->chain_index - 1] = NULL; destroyBufferStream(stream->chunkbs); destroyLine(stream->line); diff --git a/tunnels/server/http2/http2_server.c b/tunnels/server/http2/http2_server.c index 7c2cbf04..f3964440 100644 --- a/tunnels/server/http2/http2_server.c +++ b/tunnels/server/http2/http2_server.c @@ -98,7 +98,9 @@ static int on_data_chunk_recv_callback(nghttp2_session *session, stream_data->payload = gdata_buf; stream_data->src_io = con->io; stream->tunnel->upStream(stream->tunnel, stream_data); - continue; + + if (nghttp2_session_get_stream_user_data(session, stream_id)) + continue; } break; }