Review usage of string.Substring (part 1)

Reduced allocations by replacing string.Substring with ReadOnlySpan<char>.Slice
This commit is contained in:
Bond_009
2020-07-22 13:34:51 +02:00
parent 0750357916
commit febb6bced6
25 changed files with 124 additions and 99 deletions

View File

@@ -390,7 +390,7 @@ namespace Emby.Server.Implementations.Networking
var host = uri.DnsSafeHost;
_logger.LogDebug("Resolving host {0}", host);
address = GetIpAddresses(host).Result.FirstOrDefault();
address = GetIpAddresses(host).GetAwaiter().GetResult().FirstOrDefault();
if (address != null)
{