fix(essentials): Adds logic to recover from malformed json response on initial communication.

Adds better formatting for active calls list print to console
This commit is contained in:
Neil Dorin
2022-02-09 17:07:18 -07:00
parent 7a2e99f145
commit bfdc882eb6
2 changed files with 13 additions and 1 deletions

View File

@@ -1182,6 +1182,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
catch (Exception ex)
{
if (ex is Newtonsoft.Json.JsonReaderException)
{
Debug.Console(1, this, "Received malformed response from codec. Unable to serialize. Disconnecting and attmpting to recconnect");
Communication.Disconnect();
Initialize();
}
Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex);
}
}