Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Jul 15, 2024
1 parent abfe873 commit c1f03bf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions tunnels/client/http2/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ static void onStreamLineResumed(void *arg)
static void onH2LinePaused(void *arg)
{
http2_client_con_state_t *con = (http2_client_con_state_t *) arg;
++(con->pause_counter);
if (con->pause_counter > 4)
{
// ++(con->pause_counter);
// if (con->pause_counter > 4)
// {
http2_client_child_con_state_t *stream_i;
for (stream_i = con->root.next; stream_i;)
{
pauseLineDownSide(stream_i->line);
stream_i = stream_i->next;
}
}
// }
}

static void onH2LineResumed(void *arg)
{
http2_client_con_state_t *con = (http2_client_con_state_t *) arg;
con->pause_counter = 0;
// con->pause_counter = 0;
http2_client_child_con_state_t *stream_i;
for (stream_i = con->root.next; stream_i;)
{
Expand Down Expand Up @@ -214,7 +214,7 @@ static void deleteHttp2Connection(http2_client_con_state_t *con)
}
unLockLine(k.ref->stream_line);
}

action_queue_t_drop(&con->actions);
doneLineDownSide(con->line);
LSTATE_DROP(con->line);
Expand Down
4 changes: 2 additions & 2 deletions tunnels/client/protobuf/protobuf_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
enum
{
kMaxPacketSize = (65536 * 1),
kMaxRecvBeforeAck = (1 << 15) - 1,
kMaxRecvBeforeAck = (1 << 15),
kMaxSendBeforeAck = (1 << 20)
};

Expand Down Expand Up @@ -128,7 +128,7 @@ static void downStream(tunnel_t *self, context_t *c)
cstate->bytes_sent_nack -= consumed;
// LOGD("consumed: %d left: %d", consumed, (int) cstate->bytes_sent_nack);

if (cstate->bytes_sent_nack < kMaxSendBeforeAck)
if (cstate->bytes_sent_nack < kMaxSendBeforeAck/2)
{
resumeLineDownSide(c->line);
}
Expand Down
10 changes: 5 additions & 5 deletions tunnels/server/http2/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,23 @@ static void onStreamLineResumed(void *arg)
static void onH2LinePaused(void *arg)
{
http2_server_con_state_t *con = (http2_server_con_state_t *) arg;
++(con->pause_counter);
if (con->pause_counter > 4)
{
// ++(con->pause_counter);
// if (con->pause_counter > 4)
// {
http2_server_child_con_state_t *stream_i;
for (stream_i = con->root.next; stream_i;)
{
pauseLineUpSide(stream_i->line);
stream_i = stream_i->next;
}
}
// }
}

static void onH2LineResumed(void *arg)
{
http2_server_con_state_t *con = (http2_server_con_state_t *) arg;
http2_server_child_con_state_t *stream_i;
con->pause_counter = 0;
// con->pause_counter = 0;
for (stream_i = con->root.next; stream_i;)
{
resumeLineUpSide(stream_i->line);
Expand Down
4 changes: 2 additions & 2 deletions tunnels/server/protobuf/protobuf_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
enum
{
kMaxPacketSize = (65536 * 1),
kMaxRecvBeforeAck = (1 << 15) - 1,
kMaxRecvBeforeAck = (1 << 15),
kMaxSendBeforeAck = (1 << 20)
};

Expand Down Expand Up @@ -97,7 +97,7 @@ static void upStream(tunnel_t *self, context_t *c)
cstate->bytes_sent_nack -= consumed;
// LOGD("consumed: %d left: %d", consumed, (int) cstate->bytes_sent_nack);

if (cstate->bytes_sent_nack < kMaxSendBeforeAck)
if (cstate->bytes_sent_nack < kMaxSendBeforeAck/2)
{
resumeLineUpSide(c->line);
}
Expand Down

0 comments on commit c1f03bf

Please sign in to comment.