From 19ea85ef12ada79d19f4661c5966f57730c80dfc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Oct 2016 10:42:53 +0200 Subject: throttle requests --- pacredir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pacredir.c b/pacredir.c index 0241586..49d3265 100644 --- a/pacredir.c +++ b/pacredir.c @@ -386,6 +386,10 @@ static int ahc_echo(void * cls, break; } + /* throttle requests - do not send all request at the same time + * but wait for a short moment (10.000 us = 0.01 s) */ + usleep(10000); + /* This is multi-threading code! * Pointer to struct request does not work as realloc can relocate the data. * We need a pointer to pointer to struct request, store the addresses in -- cgit v1.2.3-70-g09d2