diff -r 1a2d7dad320e -r 4775bffe6173 GUI/CrashReportForm.cs --- a/GUI/CrashReportForm.cs Sun Apr 25 14:40:19 2010 +0000 +++ b/GUI/CrashReportForm.cs Sun Apr 25 19:05:15 2010 +0000 @@ -79,7 +79,7 @@ WebRequest request = WebRequest.Create( "http://openhardwaremonitor.org/report.php"); request.Method = "POST"; - request.Timeout = 3000; + request.Timeout = 5000; request.ContentType = "application/x-www-form-urlencoded"; string report = @@ -89,10 +89,11 @@ byte[] byteArray = Encoding.UTF8.GetBytes(report); request.ContentLength = byteArray.Length; - Stream dataStream = request.GetRequestStream(); - dataStream.Write(byteArray, 0, byteArray.Length); - dataStream.Close(); try { + Stream dataStream = request.GetRequestStream(); + dataStream.Write(byteArray, 0, byteArray.Length); + dataStream.Close(); + WebResponse response = request.GetResponse(); dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); @@ -100,10 +101,13 @@ reader.Close(); dataStream.Close(); response.Close(); + + Close(); } catch (WebException) { + MessageBox.Show("Sending the crash report failed.", "Error", + MessageBoxButtons.OK, MessageBoxIcon.Error); } - } finally { - Close(); + } catch { } } }