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

line endings oddity

parent 633a91bd
......@@ -54,12 +54,12 @@ public ServerSelectionStrategy(ConnectionMultiplexer multiplexer)
this.multiplexer = multiplexer;
}
public ServerType ServerType { get; set; } = ServerType.Standalone;
internal int TotalSlots => RedisClusterSlotCount;
public ServerType ServerType { get; set; } = ServerType.Standalone;
internal int TotalSlots => RedisClusterSlotCount;
/// <summary>
/// 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>
public unsafe int HashSlot(RedisKey key)
{
......@@ -131,13 +131,13 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
var command = message.Command;
switch (Message.GetMasterSlaveFlags(message.Flags))
{
case CommandFlags.DemandMaster:
case CommandFlags.DemandMaster:
resendVia = server.IsSelectable(command) ? server : null;
break;
case CommandFlags.PreferMaster:
case CommandFlags.PreferMaster:
resendVia = server.IsSelectable(command) ? server : FindSlave(server, command);
break;
case CommandFlags.PreferSlave:
case CommandFlags.PreferSlave:
resendVia = FindSlave(server, command) ?? (server.IsSelectable(command) ? server : null);
break;
case CommandFlags.DemandSlave:
......@@ -149,7 +149,7 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
multiplexer.Trace("Unable to resend to " + endpoint);
}
else
{
{
message.PrepareToResend(resendVia, isMoved);
retry = resendVia.TryEnqueue(message);
}
......@@ -182,7 +182,7 @@ internal int CombineSlot(int oldSlot, int newSlot)
if (oldSlot == NoSlot) return newSlot;
return oldSlot == newSlot ? oldSlot : MultipleSlots;
}
internal int CombineSlot(int oldSlot, RedisKey key)
{
if (oldSlot == MultipleSlots || key.IsNull) return oldSlot;
......@@ -191,7 +191,7 @@ internal int CombineSlot(int oldSlot, RedisKey key)
if (oldSlot == NoSlot) return newSlot;
return oldSlot == newSlot ? oldSlot : MultipleSlots;
}
internal int CountCoveredSlots()
{
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