FlotSamAssetcache write to disk needs be sync.

0.9.1.1
UbitUmarov 2019-11-01 15:00:22 +00:00
parent 3236e24c74
commit 26b5affb04
1 changed files with 5 additions and 2 deletions

View File

@ -337,8 +337,10 @@ namespace OpenSim.Region.CoreModules.Asset
} }
Util.FireAndForget( // Util.FireAndForget(
delegate { WriteFileCache(filename, asset); }, null, "FlotsamAssetCache.UpdateFileCache"); // delegate { WriteFileCache(filename, asset); }, null, "FlotsamAssetCache.UpdateFileCache");
//this must be sync
WriteFileCache(filename, asset);
} }
} }
catch (Exception e) catch (Exception e)
@ -800,6 +802,7 @@ namespace OpenSim.Region.CoreModules.Asset
stream = File.Open(tempname, FileMode.Create); stream = File.Open(tempname, FileMode.Create);
BinaryFormatter bformatter = new BinaryFormatter(); BinaryFormatter bformatter = new BinaryFormatter();
bformatter.Serialize(stream, asset); bformatter.Serialize(stream, asset);
stream.Flush();
} }
catch (IOException e) catch (IOException e)
{ {