Skip to content

Commit 32b42ab

Browse files
committed
Fix build errors: review CookieStickySessions
1 parent 1c1cebc commit 32b42ab

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Ocelot/LoadBalancer/LoadBalancers/CookieStickySessions.cs

-5
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@ namespace Ocelot.LoadBalancer.LoadBalancers;
99
public class CookieStickySessions : ILoadBalancer
1010
{
1111
private readonly int _keyExpiryInMs;
12-
private readonly string _key;
1312
private readonly string _cookieName;
1413
private readonly ILoadBalancer _loadBalancer;
15-
private readonly IStickySessionStorage _storage;
1614
private readonly IBus<StickySession> _bus;
1715

1816
private static readonly object Locker = new();
19-
//private static readonly Dictionary<string, StickySession> Stored = new(); // TODO Inject instead of static sharing
2017
private readonly IStickySessionStorage _storage;
2118

2219
public string Type => nameof(CookieStickySessions);
2320

2421
public CookieStickySessions(ILoadBalancer loadBalancer, string cookieName, int keyExpiryInMs, IBus<StickySession> bus, IStickySessionStorage storage)
2522
{
2623
_bus = bus;
27-
_key = key;
2824
_cookieName = cookieName;
2925
_keyExpiryInMs = keyExpiryInMs;
3026
_loadBalancer = loadBalancer;
@@ -79,7 +75,6 @@ protected void Update(string key, StickySession value)
7975
{
8076
lock (Locker)
8177
{
82-
//Stored[key] = value;
8378
_storage.SetSession(key, value);
8479
_bus.Publish(value, _keyExpiryInMs);
8580
}

0 commit comments

Comments
 (0)