enclose GetRequestStream on try/catch
parent
99111e5052
commit
5274a3181e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue