Closing the requestStream and setting a 10 sec timeout for getting it.
parent
0c03a48fb2
commit
cf1fd7de4a
|
@ -58,6 +58,7 @@ namespace OpenSim.Framework.Servers
|
||||||
WebRequest request = WebRequest.Create(requestUrl);
|
WebRequest request = WebRequest.Create(requestUrl);
|
||||||
request.Method = verb;
|
request.Method = verb;
|
||||||
request.ContentType = "text/xml";
|
request.ContentType = "text/xml";
|
||||||
|
request.Timeout = 10000;
|
||||||
|
|
||||||
MemoryStream buffer = new MemoryStream();
|
MemoryStream buffer = new MemoryStream();
|
||||||
|
|
||||||
|
@ -76,6 +77,7 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
Stream requestStream = request.GetRequestStream();
|
Stream requestStream = request.GetRequestStream();
|
||||||
requestStream.Write(buffer.ToArray(), 0, length);
|
requestStream.Write(buffer.ToArray(), 0, length);
|
||||||
|
requestStream.Close();
|
||||||
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
|
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
|
||||||
request.BeginGetResponse(AsyncCallback, request);
|
request.BeginGetResponse(AsyncCallback, request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ namespace OpenSim.Framework.Servers
|
||||||
WebRequest request = WebRequest.Create(requestUrl);
|
WebRequest request = WebRequest.Create(requestUrl);
|
||||||
request.Method = verb;
|
request.Method = verb;
|
||||||
request.ContentType = "text/xml";
|
request.ContentType = "text/xml";
|
||||||
|
request.Timeout = 10000;
|
||||||
|
|
||||||
MemoryStream buffer = new MemoryStream();
|
MemoryStream buffer = new MemoryStream();
|
||||||
|
|
||||||
|
@ -144,6 +145,7 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
Stream requestStream = request.GetRequestStream();
|
Stream requestStream = request.GetRequestStream();
|
||||||
requestStream.Write(buffer.ToArray(), 0, length);
|
requestStream.Write(buffer.ToArray(), 0, length);
|
||||||
|
requestStream.Close();
|
||||||
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
|
// IAsyncResult result = request.BeginGetResponse(AsyncCallback, request);
|
||||||
request.BeginGetResponse(AsyncCallback, request);
|
request.BeginGetResponse(AsyncCallback, request);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue