diff --git a/Properties/AssemblyVersion.cs b/Properties/AssemblyVersion.cs index 2539b7e..94ebd84 100644 --- a/Properties/AssemblyVersion.cs +++ b/Properties/AssemblyVersion.cs @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.5.1.14")] -[assembly: AssemblyInformationalVersion("0.5.1.14 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.1.15")] +[assembly: AssemblyInformationalVersion("0.5.1.15 Alpha")] \ No newline at end of file diff --git a/Utilities/HttpServer.cs b/Utilities/HttpServer.cs index 8d3ab75..dfac102 100644 --- a/Utilities/HttpServer.cs +++ b/Utilities/HttpServer.cs @@ -5,7 +5,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. Copyright (C) 2012 Prince Samuel - Copyright (C) 2012 Michael Möller + Copyright (C) 2012-2013 Michael Möller */ @@ -37,6 +37,7 @@ namespace OpenHardwareMonitor.Utilities { try { listener = new HttpListener(); + listener.IgnoreWriteExceptions = true; } catch (PlatformNotSupportedException) { listener = null; } @@ -156,10 +157,12 @@ namespace OpenHardwareMonitor.Utilities { while ((len = stream.Read(buffer, 0, buffer.Length)) > 0) { output.Write(buffer, 0, len); } - output.Close(); - } catch (HttpListenerException) { + output.Flush(); + output.Close(); + response.Close(); + } catch (HttpListenerException) { + } catch (InvalidOperationException) { } - response.Close(); return; } }