mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-01-11 19:44:44 +00:00
add StopDebugTimer method
This commit is contained in:
@@ -79,15 +79,7 @@ namespace PepperDash.Core
|
||||
|
||||
_DebugTimeoutInMs = minutes * 60000;
|
||||
|
||||
if (DebugExpiryPeriod != null)
|
||||
{
|
||||
DebugExpiryPeriod.Stop();
|
||||
DebugExpiryPeriod.Dispose();
|
||||
DebugExpiryPeriod = null;
|
||||
}
|
||||
|
||||
RxStreamDebuggingIsEnabled = false;
|
||||
TxStreamDebuggingIsEnabled = false;
|
||||
StopDebugTimer();
|
||||
|
||||
DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs);
|
||||
|
||||
@@ -106,17 +98,24 @@ namespace PepperDash.Core
|
||||
/// </summary>
|
||||
private void DisableDebugging()
|
||||
{
|
||||
if (DebugExpiryPeriod != null)
|
||||
{
|
||||
DebugExpiryPeriod.Stop();
|
||||
DebugExpiryPeriod.Dispose();
|
||||
DebugExpiryPeriod = null;
|
||||
}
|
||||
StopDebugTimer();
|
||||
|
||||
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
||||
}
|
||||
|
||||
private void StopDebugTimer()
|
||||
{
|
||||
RxStreamDebuggingIsEnabled = false;
|
||||
TxStreamDebuggingIsEnabled = false;
|
||||
|
||||
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
||||
if (DebugExpiryPeriod == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DebugExpiryPeriod.Stop();
|
||||
DebugExpiryPeriod.Dispose();
|
||||
DebugExpiryPeriod = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user