Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Apr 2, 2024
1 parent e2062e8 commit b553d4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions tunnels/client/http2/http2_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static inline void upStream(tunnel_t *self, context_t *c)
{
http2_client_child_con_state_t *stream = CSTATE(c);
http2_client_con_state_t *con = stream->parent->chains_state[self->chain_index];
stream->io = c->src_io;
stream->io = c->src_io ? c->src_io : stream->io;
if (!con->handshake_completed)
{
contextQueuePush(con->queue, c);
Expand Down Expand Up @@ -378,7 +378,7 @@ static inline void downStream(tunnel_t *self, context_t *c)
{
http2_client_state_t *state = STATE(self);
http2_client_con_state_t *con = CSTATE(c);
con->io = c->src_io;
con->io = c->src_io ? c->src_io : con->io;

if (c->payload != NULL)
{
Expand Down Expand Up @@ -409,7 +409,6 @@ static inline void downStream(tunnel_t *self, context_t *c)
con_dest->upStream(con_dest, con_fc);
}


destroyContext(c);
}
else
Expand Down
2 changes: 1 addition & 1 deletion tunnels/server/http2/http2_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static inline void downStream(tunnel_t *self, context_t *c)
{
http2_server_child_con_state_t *stream = (http2_server_child_con_state_t *)CSTATE(c);
http2_server_con_state_t *con = stream->parent->chains_state[self->chain_index];
stream->io = c->src_io;
stream->io = c->src_io ? c->src_io : stream->io;

if (c->payload != NULL)
{
Expand Down

0 comments on commit b553d4a

Please sign in to comment.