add udp error handling

This commit is contained in:
Luke Pulverenti
2016-11-04 19:57:21 -04:00
parent 67ad1db6b7
commit 25312d7d03
6 changed files with 85 additions and 95 deletions

View File

@@ -124,9 +124,17 @@ namespace Emby.Server.Implementations.Security
//the rest of the lines should be pairs of features and timestamps
for (var i = 2; i < contents.Length; i = i + 2)
{
var feat = Guid.Parse(contents[i]);
var line = contents[i];
if (string.IsNullOrWhiteSpace(line))
{
continue;
}
SetUpdateRecord(feat, new DateTime(Convert.ToInt64(contents[i + 1])));
Guid feat;
if (Guid.TryParse(line, out feat))
{
SetUpdateRecord(feat, new DateTime(Convert.ToInt64(contents[i + 1])));
}
}
}
}