diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-10-04 11:20:29 -0400 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-10-04 11:20:29 -0400 |
| commit | d3e71fdc2c35ab75ebdac573698bbb86bbd0d98f (patch) | |
| tree | 78b255dbe76bdaa81f9f4b6abd09f4b8656311d0 /indra/newview/lltexturefetch.cpp | |
| parent | cafefd3f5f161d79ecd62bc00b769e6b2b94dc82 (diff) | |
| parent | accb815c9da96a92d1c3d88bdfc7585128a40da8 (diff) | |
Automated merge from viewer-development-shining
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 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; |
