diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 9982556853..c4a9a19138 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -26,6 +26,7 @@ */ using System; +using System.Timers; using System.Collections; using System.Collections.Generic; using System.IO; @@ -1106,6 +1107,7 @@ namespace OpenSim.Region.ClientStack.Linden private string m_invType = String.Empty; private string m_assetType = String.Empty; + private Timer m_timeoutTimer = new Timer(); public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolderID, string invType, string assetType, string path, @@ -1121,6 +1123,11 @@ namespace OpenSim.Region.ClientStack.Linden m_assetType = assetType; m_invType = invType; m_dumpAssetsToFile = dumpAssetsToFile; + + m_timeoutTimer.Elapsed += TimedOut; + m_timeoutTimer.Interval = 120000; + m_timeoutTimer.AutoReset = false; + m_timeoutTimer.Start(); } /// @@ -1163,6 +1170,11 @@ namespace OpenSim.Region.ClientStack.Linden return res; } + private void TimedOut(object sender, ElapsedEventArgs args) + { + httpListener.RemoveStreamHandler("POST", uploaderPath); + } + ///Left this in and commented in case there are unforseen issues //private void SaveAssetToFile(string filename, byte[] data) //{