Commit 20fa2587 authored by Marc Gravell's avatar Marc Gravell

line endings oddity

parent 633a91bd
...@@ -54,12 +54,12 @@ public ServerSelectionStrategy(ConnectionMultiplexer multiplexer) ...@@ -54,12 +54,12 @@ public ServerSelectionStrategy(ConnectionMultiplexer multiplexer)
this.multiplexer = multiplexer; this.multiplexer = multiplexer;
} }
public ServerType ServerType { get; set; } = ServerType.Standalone; public ServerType ServerType { get; set; } = ServerType.Standalone;
internal int TotalSlots => RedisClusterSlotCount; internal int TotalSlots => RedisClusterSlotCount;
/// <summary> /// <summary>
/// Computes the hash-slot that would be used by the given key /// Computes the hash-slot that would be used by the given key
/// </summary> /// </summary>
/// <param name="key">The <see cref="RedisKey"/> to determine a slot ID for.</param> /// <param name="key">The <see cref="RedisKey"/> to determine a slot ID for.</param>
public unsafe int HashSlot(RedisKey key) public unsafe int HashSlot(RedisKey key)
{ {
...@@ -131,13 +131,13 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM ...@@ -131,13 +131,13 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
var command = message.Command; var command = message.Command;
switch (Message.GetMasterSlaveFlags(message.Flags)) switch (Message.GetMasterSlaveFlags(message.Flags))
{ {
case CommandFlags.DemandMaster: case CommandFlags.DemandMaster:
resendVia = server.IsSelectable(command) ? server : null; resendVia = server.IsSelectable(command) ? server : null;
break; break;
case CommandFlags.PreferMaster: case CommandFlags.PreferMaster:
resendVia = server.IsSelectable(command) ? server : FindSlave(server, command); resendVia = server.IsSelectable(command) ? server : FindSlave(server, command);
break; break;
case CommandFlags.PreferSlave: case CommandFlags.PreferSlave:
resendVia = FindSlave(server, command) ?? (server.IsSelectable(command) ? server : null); resendVia = FindSlave(server, command) ?? (server.IsSelectable(command) ? server : null);
break; break;
case CommandFlags.DemandSlave: case CommandFlags.DemandSlave:
...@@ -149,7 +149,7 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM ...@@ -149,7 +149,7 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
multiplexer.Trace("Unable to resend to " + endpoint); multiplexer.Trace("Unable to resend to " + endpoint);
} }
else else
{ {
message.PrepareToResend(resendVia, isMoved); message.PrepareToResend(resendVia, isMoved);
retry = resendVia.TryEnqueue(message); retry = resendVia.TryEnqueue(message);
} }
...@@ -182,7 +182,7 @@ internal int CombineSlot(int oldSlot, int newSlot) ...@@ -182,7 +182,7 @@ internal int CombineSlot(int oldSlot, int newSlot)
if (oldSlot == NoSlot) return newSlot; if (oldSlot == NoSlot) return newSlot;
return oldSlot == newSlot ? oldSlot : MultipleSlots; return oldSlot == newSlot ? oldSlot : MultipleSlots;
} }
internal int CombineSlot(int oldSlot, RedisKey key) internal int CombineSlot(int oldSlot, RedisKey key)
{ {
if (oldSlot == MultipleSlots || key.IsNull) return oldSlot; if (oldSlot == MultipleSlots || key.IsNull) return oldSlot;
...@@ -191,7 +191,7 @@ internal int CombineSlot(int oldSlot, RedisKey key) ...@@ -191,7 +191,7 @@ internal int CombineSlot(int oldSlot, RedisKey key)
if (oldSlot == NoSlot) return newSlot; if (oldSlot == NoSlot) return newSlot;
return oldSlot == newSlot ? oldSlot : MultipleSlots; return oldSlot == newSlot ? oldSlot : MultipleSlots;
} }
internal int CountCoveredSlots() internal int CountCoveredSlots()
{ {
var arr = map; var arr = map;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment