Check cached asset to make sure it contains data, and if not, re-request

avinationmerge
Tom Grimshaw 2010-07-04 06:45:04 -07:00
parent 4cd5e64231
commit 3368e3853a
1 changed files with 3 additions and 3 deletions

View File

@ -151,8 +151,8 @@ namespace OpenSim.Services.Connectors
AssetBase asset = null;
if (m_Cache != null)
asset = m_Cache.Get(id);
if (asset == null)
if (asset == null || asset.Data == null || asset.Data.Length == 0)
{
asset = SynchronousRestObjectRequester.
MakeRequest<int, AssetBase>("GET", uri, 0);
@ -229,7 +229,7 @@ namespace OpenSim.Services.Connectors
if (m_Cache != null)
asset = m_Cache.Get(id);
if (asset == null)
if (asset == null || asset.Data == null || asset.Data.Length == 0)
{
bool result = false;