From 3dc9cacfad034b11e8ddfb37b24b15499190c6bf Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 13 Mar 2013 16:23:46 -0400 Subject: #51 - Restart the server took long time, and dashboard will die --- MediaBrowser.ServerApplication/App.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MediaBrowser.ServerApplication') diff --git a/MediaBrowser.ServerApplication/App.xaml.cs b/MediaBrowser.ServerApplication/App.xaml.cs index 0155d0c90e..35f203a629 100644 --- a/MediaBrowser.ServerApplication/App.xaml.cs +++ b/MediaBrowser.ServerApplication/App.xaml.cs @@ -134,6 +134,11 @@ namespace MediaBrowser.ServerApplication Logger.ErrorException("UnhandledException", exception); MessageBox.Show("Unhandled exception: " + exception.Message); + + if (!Debugger.IsAttached) + { + Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception)); + } } /// -- cgit v1.2.3