mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 04:57:15 +00:00
fixes issue with optional timeout parameter
This commit is contained in:
parent
625c870072
commit
26bd0d624e
1 changed files with 31 additions and 29 deletions
|
|
@ -313,7 +313,13 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
var deviceKey = args[0];
|
||||
var setting = args[1];
|
||||
var timeout = args[2];
|
||||
|
||||
var timeout= String.Empty;
|
||||
|
||||
if (args.Length >= 3)
|
||||
{
|
||||
timeout = args[2];
|
||||
}
|
||||
|
||||
var device = GetDeviceForKey(deviceKey) as IStreamDebugging;
|
||||
|
||||
|
|
@ -322,9 +328,8 @@ namespace PepperDash.Essentials.Core
|
|||
Debug.Console(0, "Unable to get device with key: {0}", deviceKey);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
eStreamDebuggingSetting debugSetting = eStreamDebuggingSetting.Off;
|
||||
|
||||
eStreamDebuggingSetting debugSetting;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -349,7 +354,6 @@ namespace PepperDash.Essentials.Core
|
|||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "Unable to convert minutes or settings value. Please use an integer value for minutes. Errro: {0}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -357,8 +361,6 @@ namespace PepperDash.Essentials.Core
|
|||
device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting);
|
||||
Debug.Console(0, "Device: '{0}' debug level set to {1) for default time (30 minutes)", deviceKey, debugSetting);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue