Skip to content

Commit d5fff16

Browse files
committed
Cleanup: ServerEndpoint
1 parent 170bbca commit d5fff16

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

StackExchange.Redis/StackExchange/Redis/ServerEndPoint.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public ServerEndPoint(ConnectionMultiplexer multiplexer, EndPoint endpoint, Text
7878
public bool IsConnected => interactive?.IsConnected == true;
7979

8080
public bool IsConnecting => interactive?.IsConnecting == true;
81-
81+
8282
internal Exception LastException
8383
{
8484
get
@@ -321,7 +321,7 @@ internal void AutoConfigure(PhysicalConnection connection)
321321

322322
private int _nextReplicaOffset;
323323
internal uint NextReplicaOffset() // used to round-robin between multiple replicas
324-
=> (uint) System.Threading.Interlocked.Increment(ref _nextReplicaOffset);
324+
=> (uint)System.Threading.Interlocked.Increment(ref _nextReplicaOffset);
325325

326326
internal Task Close()
327327
{
@@ -393,11 +393,11 @@ internal string GetProfile()
393393
internal byte[] GetScriptHash(string script, RedisCommand command)
394394
{
395395
var found = (byte[])knownScripts[script];
396-
if(found == null && command == RedisCommand.EVALSHA)
396+
if (found == null && command == RedisCommand.EVALSHA)
397397
{
398398
// the script provided is a hex sha; store and re-use the ascii for that
399399
found = Encoding.ASCII.GetBytes(script);
400-
lock(knownScripts)
400+
lock (knownScripts)
401401
{
402402
knownScripts[script] = found;
403403
}
@@ -581,14 +581,15 @@ internal string Summary()
581581
var tmp = interactive;
582582
sb.Append("; int: ").Append(tmp?.ConnectionState.ToString() ?? "n/a");
583583
tmp = subscription;
584-
if(tmp == null)
584+
if (tmp == null)
585585
{
586586
sb.Append("; sub: n/a");
587-
} else
587+
}
588+
else
588589
{
589590
var state = tmp.ConnectionState;
590591
sb.Append("; sub: ").Append(state);
591-
if(state == PhysicalBridge.State.ConnectedEstablished)
592+
if (state == PhysicalBridge.State.ConnectedEstablished)
592593
{
593594
sb.Append(", ").Append(tmp.SubscriptionCount).Append(" active");
594595
}
@@ -678,7 +679,7 @@ private void Handshake(PhysicalConnection connection, TextWriter log)
678679
if (connType == ConnectionType.Subscription)
679680
{
680681
var configChannel = multiplexer.ConfigurationChangedChannel;
681-
if(configChannel != null)
682+
if (configChannel != null)
682683
{
683684
msg = Message.Create(-1, CommandFlags.FireAndForget, RedisCommand.SUBSCRIBE, (RedisChannel)configChannel);
684685
WriteDirectOrQueueFireAndForget(connection, msg, ResultProcessor.TrackSubscriptions);
@@ -690,7 +691,7 @@ private void Handshake(PhysicalConnection connection, TextWriter log)
690691

691692
private void SetConfig<T>(ref T field, T value, [CallerMemberName] string caller = null)
692693
{
693-
if(!EqualityComparer<T>.Default.Equals(field, value))
694+
if (!EqualityComparer<T>.Default.Equals(field, value))
694695
{
695696
multiplexer.Trace(caller + " changed from " + field + " to " + value, "Configuration");
696697
field = value;

0 commit comments

Comments
 (0)