Removal of HTTPRequestRate and dead code.

This commit is contained in:
Aleric Inglewood
2013-04-05 20:46:33 +02:00
parent 17455e2442
commit 6c9b136d32
2 changed files with 0 additions and 35 deletions

View File

@@ -172,17 +172,6 @@
<integer>1</integer>
</map>
<key>HTTPRequestRate</key>
<map>
<key>Comment</key>
<string>Number of HTTP texture requests fired per second.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>30</integer>
</map>
<key>HTTPMaxRequests</key>
<map>
<key>Comment</key>

View File

@@ -495,30 +495,6 @@ public:
SGHostBlackList::blacklist_t SGHostBlackList::blacklist;
#if 0
//call every time a connection is opened
//return true if connecting allowed
static bool sgConnectionThrottle() {
const U32 THROTTLE_TIMESTEPS_PER_SECOND = 10;
static const LLCachedControl<U32> max_connections_per_second("HTTPRequestRate", 30);
U32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND;
const U32 timestep = USEC_PER_SEC/THROTTLE_TIMESTEPS_PER_SECOND;
U64 now = LLTimer::getTotalTime();
std::deque<U64> timestamps;
while(!timestamps.empty() && (timestamps[0]<=now-timestep)) {
timestamps.pop_front();
}
if(timestamps.size() < max_connections) {
//llinfos << "throttle pass" << llendl;
timestamps.push_back(now);
return true;
} else {
//llinfos << "throttle fail" << llendl;
return false;
}
}
#endif
//////////////////////////////////////////////////////////////////////////////
// Cross-thread messaging for asset metrics.