Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Apr 11, 2024
1 parent 63725cf commit 7e50bd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tunnels/client/reverse/reverse_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ static inline void downStream(tunnel_t *self, context_t *c)
}
else
{
state->unused_cons[tid] -= 1;
ucstate->pair_connected = true;
if (state->unused_cons[tid] > 0)
state->unused_cons[tid] -= 1;
atomic_fetch_add_explicit(&(state->reverse_cons), 1, memory_order_relaxed);
self->dw->downStream(self->dw, newInitContext(ucstate->d));

if (CSTATE_U(c) == NULL)
{
reuseBuffer(buffer_pools[c->line->tid], c->payload);
c->payload = NULL;
destroyContext(c);
return;
}
ucstate->pair_connected = true;

// first byte is 0xFF a signal from reverse server
uint8_t check = 0x0;
Expand Down

0 comments on commit 7e50bd2

Please sign in to comment.