mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 05:50:30 +02:00
Reintroduce request limit in ResourceCache
This commit is contained in:
parent
750080fe66
commit
33d6f561eb
1 changed files with 6 additions and 6 deletions
|
@ -154,12 +154,12 @@ void ResourceCache::clearUnusedResource() {
|
|||
|
||||
void ResourceCache::attemptRequest(Resource* resource) {
|
||||
auto sharedItems = DependencyManager::get<ResourceCacheSharedItems>();
|
||||
// if (_requestLimit <= 0) {
|
||||
// qDebug() << "REQUEST LIMIT REACHED (" << _requestLimit << "), queueing: " << resource->getURL();
|
||||
// // wait until a slot becomes available
|
||||
// sharedItems->_pendingRequests.append(resource);
|
||||
// return;
|
||||
// }
|
||||
if (_requestLimit <= 0) {
|
||||
qDebug() << "REQUEST LIMIT REACHED (" << _requestLimit << "), queueing: " << resource->getURL();
|
||||
// wait until a slot becomes available
|
||||
sharedItems->_pendingRequests.append(resource);
|
||||
return;
|
||||
}
|
||||
qDebug() << "-- Decreasing limit for : " << resource->getURL();
|
||||
_requestLimit--;
|
||||
sharedItems->_loadingRequests.append(resource);
|
||||
|
|
Loading…
Reference in a new issue