summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2010-09-27 09:42:27 -0700
committerKelly Washington <kelly@lindenlab.com>2010-09-27 09:42:27 -0700
commitfa22f0a6f8d1144bee20654209342280a772bcae (patch)
treeadcc7010ffc4e57e49b6ba03b3f652be41a125a1 /indra/newview/lltexturefetch.cpp
parent753238d70e0db62faaf5ccb50e62cdf96ed4f344 (diff)
parent2f29c3511422e29bbdefa43af2fc3fc785c38c86 (diff)
Merge
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 4e9ebce4d1..fafef84aa2 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -847,10 +847,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
if(mCanUseHTTP)
{
//NOTE:
- //it seems ok to let sim control the UDP traffic
- //so there is no throttle for http here.
+ //control the number of the http requests issued for:
+ //1, not openning too many file descriptors at the same time;
+ //2, control the traffic of http so udp gets bandwidth.
//
-
+ static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 32 ;
+ if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE)
+ {
+ return false ; //wait.
+ }
+
mFetcher->removeFromNetworkQueue(this, false);
S32 cur_size = 0;