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
This commit is contained in:
Mic Bowman
2011-11-02 18:55:54 -07:00
parent 6b4ae4f30c
commit 40a1eddfd1

View File

@@ -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();
}
}