From 8d99449b08f8717354fc432ed575847fe64261d0 Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 25 Feb 2019 23:36:25 +0800 Subject: [PATCH] fix bug #791 (#795) --- src/Ocelot/Configuration/LoadBalancerOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ocelot/Configuration/LoadBalancerOptions.cs b/src/Ocelot/Configuration/LoadBalancerOptions.cs index 08dc3b87..cbf9c59e 100644 --- a/src/Ocelot/Configuration/LoadBalancerOptions.cs +++ b/src/Ocelot/Configuration/LoadBalancerOptions.cs @@ -6,7 +6,7 @@ namespace Ocelot.Configuration { public LoadBalancerOptions(string type, string key, int expiryInMs) { - Type = type ?? nameof(NoLoadBalancer); + Type = string.IsNullOrWhiteSpace(type) ? nameof(NoLoadBalancer) : type; Key = key; ExpiryInMs = expiryInMs; } @@ -14,7 +14,7 @@ namespace Ocelot.Configuration public string Type { get; } public string Key { get; } - - public int ExpiryInMs { get; } + + public int ExpiryInMs { get; } } }