diff --git a/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs b/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs index 3f1624a..f3b5613 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs @@ -58,11 +58,10 @@ namespace PepperDash.Core if (setting == eStreamDebuggingSetting.Off) { DisableDebugging(); + return; } - else - { - SetDebuggingWithSpecificTimeout(setting, _DefaultDebugTimeoutMin); - } + + SetDebuggingWithSpecificTimeout(setting, _DefaultDebugTimeoutMin); } /// @@ -72,6 +71,12 @@ namespace PepperDash.Core /// public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) { + if (setting == eStreamDebuggingSetting.Off) + { + DisableDebugging(); + return; + } + _DebugTimeoutInMs = minutes * 60000; if (DebugExpiryPeriod != null) @@ -94,7 +99,7 @@ namespace PepperDash.Core /// /// Disabled debugging /// - public void DisableDebugging() + private void DisableDebugging() { DebugExpiryPeriod.Stop(); DebugExpiryPeriod.Dispose();