mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 03:57:08 +00:00
Adds null check in WaitAndTryReconnect()
This commit is contained in:
parent
f9ae8ca38f
commit
aebd577dd6
1 changed files with 7 additions and 2 deletions
|
|
@ -317,11 +317,16 @@ namespace PepperDash.Core
|
|||
/// </summary>
|
||||
void WaitAndTryReconnect()
|
||||
{
|
||||
if (Client != null)
|
||||
{
|
||||
Debug.Console(1, "Attempting reconnect, status={0}", Client.ClientStatus);
|
||||
}
|
||||
|
||||
DisconnectClient();
|
||||
|
||||
Debug.Console(1, "Attempting reconnect, status={0}", Client.ClientStatus);
|
||||
if(!DisconnectCalledByUser)
|
||||
if (!DisconnectCalledByUser)
|
||||
RetryTimer = new CTimer(o => { Client.ConnectToServerAsync(ConnectToServerCallback); }, AutoReconnectIntervalMs);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue