From 91abd2dd1073e17d3511f98e85413822ac44bc17 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 9 Jun 2020 15:53:43 -0600 Subject: [PATCH 1/2] fixes issues with various methods --- .../Comm/CommunicationStreamDebugging.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs b/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs index 3f1624a..9fd0f71 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) == 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(); From e3c5f101bc9e69c8360e5532bb7032ae99793368 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 9 Jun 2020 15:57:32 -0600 Subject: [PATCH 2/2] fixes conditional for turning debugging off --- .../Pepperdash Core/Comm/CommunicationStreamDebugging.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs b/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs index 9fd0f71..f3b5613 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/CommunicationStreamDebugging.cs @@ -71,7 +71,7 @@ namespace PepperDash.Core /// public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) { - if ((setting & eStreamDebuggingSetting.Off) == eStreamDebuggingSetting.Off) + if (setting == eStreamDebuggingSetting.Off) { DisableDebugging(); return;