Prevent an object disposed exception that made forms comms unreliable. After

starting an asynchronous write, one should not close the channel it will
be written to synchrnously, that leads to grief.
This commit is contained in:
Melanie Thielker
2010-08-25 23:34:39 +02:00
committed by Melanie
parent 604423d52b
commit 75e2a2b3ce

View File

@@ -85,8 +85,13 @@ namespace OpenSim.Framework.Servers.HttpServer
}
finally
{
if (requestStream != null)
requestStream.Close();
// If this is closed, it will be disposed internally,
// but the above write is asynchronous and may hit after
// we're through here. So the thread handling that will
// throw and put us back into the catch above. Isn't
// .NET great?
//if (requestStream != null)
// requestStream.Close();
// Let's not close this
//buffer.Close();