diff --git a/BookAStar/BookAStar/App.xaml.cs b/BookAStar/BookAStar/App.xaml.cs index 7e665a83..46dd40dc 100644 --- a/BookAStar/BookAStar/App.xaml.cs +++ b/BookAStar/BookAStar/App.xaml.cs @@ -82,7 +82,6 @@ namespace BookAStar // Called on rotation after OnSuspended private void OnClosing(object sender, EventArgs e) { - ChatHubConnection.Dispose(); } // FIXME Never called. @@ -337,6 +336,7 @@ namespace BookAStar if (CrossConnectivity.Current.IsConnected) try { + if (chatHubConnection.State == ConnectionState.Disconnected) await chatHubConnection.Start(); } catch (WebException ) @@ -375,6 +375,7 @@ namespace BookAStar { try { + if (chatHubConnection.State != ConnectionState.Disconnected) chatHubConnection.Stop(); } catch (WebException)