From 40a1eddfd173609923b0c8d24517b8ddb1a91bbd Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Wed, 2 Nov 2011 18:55:54 -0700 Subject: Drop the CopyTo parameter from Int32.MaxValue to 4096. This is a buffer size not a target size. Mono 2.10 appears to try to allocate the full buffer which immediately crashes. Tested on mono 2.6.7 and 2.10.5 --- OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 30d3147..d8089ac 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -473,7 +473,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // Grab the asset data from the response stream using (MemoryStream stream = new MemoryStream()) { - responseStream.CopyTo(stream, Int32.MaxValue); + responseStream.CopyTo(stream, 4096); asset.Data = stream.ToArray(); } } -- cgit v1.1