Closing the requestStream and setting a 10 sec timeout for getting it.

0.6.3-post-fixes
diva 2009-02-04 13:13:47 +00:00
parent 0c03a48fb2
commit cf1fd7de4a
2 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,7 @@ namespace OpenSim.Framework.Servers
WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb;
request.ContentType = "text/xml";
request.Timeout = 10000;
MemoryStream buffer = new MemoryStream();
@ -76,6 +77,7 @@ namespace OpenSim.Framework.Servers
Stream requestStream = request.GetRequestStream();
requestStream.Write(buffer.ToArray(), 0, length);
requestStream.Close();
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
request.BeginGetResponse(AsyncCallback, request);
}

View File

@ -126,6 +126,7 @@ namespace OpenSim.Framework.Servers
WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb;
request.ContentType = "text/xml";
request.Timeout = 10000;
MemoryStream buffer = new MemoryStream();
@ -144,6 +145,7 @@ namespace OpenSim.Framework.Servers
Stream requestStream = request.GetRequestStream();
requestStream.Write(buffer.ToArray(), 0, length);
requestStream.Close();
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
request.BeginGetResponse(AsyncCallback, request);
}