enclose GetRequestStream on try/catch

0.9.0-post-fixes
UbitUmarov 2017-05-28 23:54:43 +01:00
parent 99111e5052
commit 5274a3181e
1 changed files with 6 additions and 6 deletions

View File

@ -1839,12 +1839,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
webRequest.ContentType = "application/json-rpc";
webRequest.Method = "POST";
using(Stream dataStream = webRequest.GetRequestStream())
dataStream.Write(content,0,content.Length);
WebResponse webResponse = null;
try
{
using(Stream dataStream = webRequest.GetRequestStream())
dataStream.Write(content,0,content.Length);
webResponse = webRequest.GetResponse();
}
catch (WebException e)
@ -1920,12 +1920,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
webRequest.ContentType = "application/json-rpc";
webRequest.Method = "POST";
using(Stream dataStream = webRequest.GetRequestStream())
dataStream.Write(content,0,content.Length);
WebResponse webResponse = null;
try
{
using(Stream dataStream = webRequest.GetRequestStream())
dataStream.Write(content,0,content.Length);
webResponse = webRequest.GetResponse();
}
catch (WebException e)