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