aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/WebUtil.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 51d87bd..2bbf785 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -1062,11 +1062,10 @@ namespace OpenSim.Framework
1062 if (WebUtil.DebugLevel >= 5) 1062 if (WebUtil.DebugLevel >= 5)
1063 WebUtil.LogOutgoingDetail("SEND", reqnum, System.Text.Encoding.UTF8.GetString(data)); 1063 WebUtil.LogOutgoingDetail("SEND", reqnum, System.Text.Encoding.UTF8.GetString(data));
1064 1064
1065 Stream requestStream = null;
1066 try 1065 try
1067 { 1066 {
1068 requestStream = request.GetRequestStream(); 1067 using(Stream requestStream = request.GetRequestStream())
1069 requestStream.Write(data, 0, length); 1068 requestStream.Write(data,0,length);
1070 } 1069 }
1071 catch (Exception e) 1070 catch (Exception e)
1072 { 1071 {
@@ -1076,9 +1075,6 @@ namespace OpenSim.Framework
1076 } 1075 }
1077 finally 1076 finally
1078 { 1077 {
1079 if (requestStream != null)
1080 requestStream.Dispose();
1081
1082 // capture how much time was spent writing 1078 // capture how much time was spent writing
1083 tickdata = Util.EnvironmentTickCountSubtract(tickstart); 1079 tickdata = Util.EnvironmentTickCountSubtract(tickstart);
1084 } 1080 }