From 26b5affb04214771b4243a76b9bbf02f4fb0a07a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 1 Nov 2019 15:00:22 +0000 Subject: [PATCH] FlotSamAssetcache write to disk needs be sync. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 5a48134b66..bbf7be745c 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -337,8 +337,10 @@ namespace OpenSim.Region.CoreModules.Asset } - Util.FireAndForget( - delegate { WriteFileCache(filename, asset); }, null, "FlotsamAssetCache.UpdateFileCache"); + // Util.FireAndForget( + // delegate { WriteFileCache(filename, asset); }, null, "FlotsamAssetCache.UpdateFileCache"); + //this must be sync + WriteFileCache(filename, asset); } } catch (Exception e) @@ -800,6 +802,7 @@ namespace OpenSim.Region.CoreModules.Asset stream = File.Open(tempname, FileMode.Create); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, asset); + stream.Flush(); } catch (IOException e) {