Skip to content

Commit

Permalink
enable random peeker
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Jul 15, 2024
1 parent 954ac7d commit 8a1ddd5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tunnels/server/reverse/reverse_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "shiftbuffer.h"
#include "tunnel.h"
#include "types.h"
#include "frand.h"
#include "ww.h"

enum
Expand Down Expand Up @@ -87,11 +88,11 @@ static void upStream(tunnel_t *self, context_t *c)

reverse_server_con_state_t *ucstate = this_tb->u_cons_root.next;

// size_t random_choosen = (fastRand() % this_tb->u_count);
// while (random_choosen--)
// {
// ucstate = ucstate->next;
// }
size_t random_choosen = (fastRand() % this_tb->u_count);
while (random_choosen--)
{
ucstate = ucstate->next;
}

removeConnectionU(this_tb, ucstate);
ucstate->d = c->line;
Expand Down

0 comments on commit 8a1ddd5

Please sign in to comment.