diff options
| author | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-09-30 12:00:29 -0700 |
|---|---|---|
| committer | Matthew Breindel (Falcon) <falcon@lindenlab.com> | 2010-09-30 12:00:29 -0700 |
| commit | 60f8c8279071b791fbc7179d8bc2bb9ca4880a03 (patch) | |
| tree | 20a513fdb383dfd36ca0dbe0a99eacd72faad835 /indra/newview/lltexturefetch.cpp | |
| parent | 569f3f4b06fc2f5a0fa658a49d519428983403f9 (diff) | |
| parent | d95b08c4a6830fc8a2319e77242d8f76eb4cbdae (diff) | |
Merge
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
| -rw-r--r-- | indra/newview/lltexturefetch.cpp | 12 |
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; |
