From 8ac1a62512f6f2f7effc792b10051078e74ac3c3 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 22 Dec 2016 19:32:30 +0100 Subject: [PATCH] fixes connection to chat hub at resume time --- BookAStar/BookAStar/App.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)