summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-09-22 14:45:22 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-09-22 14:45:22 -0600
commitd2f1f42af257575114c2069562534b88bec0de5d (patch)
treecd2d4edbee0d5fa7ea3aae6a81726a012e9be2da /indra/newview
parent3a1f0ef173e5853f20aed93c741a9f74637d7d36 (diff)
parentdfe12745523d2b3d5c1720bec211555c09437a87 (diff)
Automated merge with http://bitbucket.org/seraph/viewer-development-shining
Diffstat (limited to 'indra/newview')
-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 7d09ea5b4f..d6d38de225 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -858,10 +858,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;