fixes connection to chat hub at resume time
This commit is contained in:
@ -82,7 +82,6 @@ namespace BookAStar
|
|||||||
// Called on rotation after OnSuspended
|
// Called on rotation after OnSuspended
|
||||||
private void OnClosing(object sender, EventArgs e)
|
private void OnClosing(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ChatHubConnection.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME Never called.
|
// FIXME Never called.
|
||||||
@ -337,6 +336,7 @@ namespace BookAStar
|
|||||||
if (CrossConnectivity.Current.IsConnected)
|
if (CrossConnectivity.Current.IsConnected)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (chatHubConnection.State == ConnectionState.Disconnected)
|
||||||
await chatHubConnection.Start();
|
await chatHubConnection.Start();
|
||||||
}
|
}
|
||||||
catch (WebException )
|
catch (WebException )
|
||||||
@ -375,6 +375,7 @@ namespace BookAStar
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (chatHubConnection.State != ConnectionState.Disconnected)
|
||||||
chatHubConnection.Stop();
|
chatHubConnection.Stop();
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
|
Reference in New Issue
Block a user