From d0912b61516914f810ba306641aaaa813134462e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 May 2017 00:47:45 +0100 Subject: let StreamReader be in using statements --- OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server/Handlers/Map/MapAddServerConnector.cs') diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs index 7611f53..bfd73a2 100644 --- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs @@ -104,9 +104,9 @@ namespace OpenSim.Server.Handlers.MapImage protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { // m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path); - StreamReader sr = new StreamReader(requestData); - string body = sr.ReadToEnd(); - sr.Close(); + string body; + using(StreamReader sr = new StreamReader(requestData)) + body = sr.ReadToEnd(); body = body.Trim(); try -- cgit v1.1