Close was being called to early on the Memory stream.
parent
b75b887798
commit
b6920267f0
|
@ -82,7 +82,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
serializer.Serialize(writer, obj);
|
||||
writer.Flush();
|
||||
}
|
||||
buffer.Close();
|
||||
|
||||
int length = (int) buffer.Length;
|
||||
request.ContentLength = length;
|
||||
|
@ -109,14 +108,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
}
|
||||
finally
|
||||
{
|
||||
buffer.Close();
|
||||
respStream.Close();
|
||||
response.Close();
|
||||
}
|
||||
|
||||
action(deserial);
|
||||
|
||||
}, null);
|
||||
}, null);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,14 +88,15 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
serializer.Serialize(writer, sobj);
|
||||
writer.Flush();
|
||||
}
|
||||
buffer.Close();
|
||||
|
||||
int length = (int)buffer.Length;
|
||||
request.ContentLength = length;
|
||||
|
||||
Stream requestStream = request.GetRequestStream();
|
||||
requestStream.Write(buffer.ToArray(), 0, length);
|
||||
buffer.Close();
|
||||
requestStream.Close();
|
||||
|
||||
TResponse deserial = default(TResponse);
|
||||
using (WebResponse resp = request.GetResponse())
|
||||
{
|
||||
|
|
|
@ -62,7 +62,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
writer.Write(obj);
|
||||
writer.Flush();
|
||||
}
|
||||
buffer.Close();
|
||||
|
||||
length = (int)obj.Length;
|
||||
request.ContentLength = length;
|
||||
|
@ -80,6 +79,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
if (requestStream != null)
|
||||
requestStream.Close();
|
||||
buffer.Close();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue