Ticket #4891: limit_HTTP_requests.patch

File limit_HTTP_requests.patch, 473 bytes (added by Indradhanush Gupta, 7 years ago)

Added functionality for limiting HTTP requests to 8.

Line 
1587a588,589
2>       queuedRequests = 0 # number of total pipelined requests in queue
3>       pauseFlag = False
4602,603c604,612
5<
6<         if queued:
7---
8>               
9>               if self.pauseFlag and self.queuedRequests < 8:
10>                       producer.resumeProducing()     
11>               if not self.pauseFlag and self.queuedRequests >= 8:
12>                       producer.pauseProducing()
13>                       pauseFlag = True
14>         
15>               if queued:
16>                       self.queuedRequests += 1
17636a646,647
18>               if self.queuedRequests > 0:
19>                       self.queuedRequests -= 1