From 4c3e238b97f8ab78b32a0f593de94bbc8bf830af Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 23 Feb 2024 16:44:52 +0000 Subject: [PATCH] Update src/StackExchange.Redis/ServerEndPoint.cs Co-authored-by: Philo --- src/StackExchange.Redis/ServerEndPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StackExchange.Redis/ServerEndPoint.cs b/src/StackExchange.Redis/ServerEndPoint.cs index 1bc968204..88eea3592 100644 --- a/src/StackExchange.Redis/ServerEndPoint.cs +++ b/src/StackExchange.Redis/ServerEndPoint.cs @@ -1094,7 +1094,7 @@ private void SetConfig(ref T field, T value, [CallerMemberName] string? calle } } internal static string ClientInfoSanitize(string? value) - { + => string.IsNullOrWhiteSpace(value) ? String.Empty : nameSanitizer.Replace(value!.Trim(), "-"); if (string.IsNullOrWhiteSpace(value)) return ""; return nameSanitizer.Replace(value!.Trim(), "-"); }