@@ -12,8 +12,9 @@ internal class RedisSentinelWorker : IDisposable
1212 static int IdCounter = 0 ;
1313 public int Id { get ; }
1414
15- private readonly object oLock = new object ( ) ;
15+ private readonly object oLock = new ( ) ;
1616
17+ private readonly RedisEndpoint sentinelEndpoint ;
1718 private readonly RedisSentinel sentinel ;
1819 private readonly RedisClient sentinelClient ;
1920 private RedisPubSubServer sentinePubSub ;
@@ -32,7 +33,7 @@ public RedisSentinelWorker(RedisSentinel sentinel, RedisEndpoint sentinelEndpoin
3233 } ;
3334
3435 if ( Log . IsDebugEnabled )
35- Log . Debug ( "Set up Redis Sentinel on {0}" . Fmt ( sentinelEndpoint ) ) ;
36+ Log . Debug ( $ "Set up Redis Sentinel on { sentinelEndpoint } " ) ;
3637 }
3738
3839 /// <summary>
@@ -43,7 +44,7 @@ public RedisSentinelWorker(RedisSentinel sentinel, RedisEndpoint sentinelEndpoin
4344 private void SentinelMessageReceived ( string channel , string message )
4445 {
4546 if ( Log . IsDebugEnabled )
46- Log . Debug ( "Received '{0 }' on channel '{1 }' from Sentinel" . Fmt ( channel , message ) ) ;
47+ Log . Debug ( $ "Received '{ channel } ' on channel '{ message } ' from Sentinel") ;
4748
4849 // {+|-}sdown is the event for server coming up or down
4950 var c = channel . ToLower ( ) ;
@@ -61,7 +62,7 @@ private void SentinelMessageReceived(string channel, string message)
6162 || ( sentinel . ResetWhenObjectivelyDown && isObjectivelyDown ) )
6263 {
6364 if ( Log . IsDebugEnabled )
64- Log . Debug ( "Sentinel detected server down/up '{0 }' with message: {1}" . Fmt ( channel , message ) ) ;
65+ Log . Debug ( $ "Sentinel detected server down/up '{ channel } ' with message: { message } " ) ;
6566
6667 sentinel . ResetClients ( ) ;
6768 }
@@ -187,7 +188,7 @@ public void BeginListeningForConfigurationChanges()
187188 }
188189 }
189190
190- this . sentinePubSub . Start ( ) ;
191+ this . sentinelPubSub . Start ( ) ;
191192 }
192193 catch ( Exception ex )
193194 {
@@ -206,7 +207,7 @@ public void ForceMasterFailover(string masterName)
206207
207208 public void Dispose ( )
208209 {
209- new IDisposable [ ] { this . sentinelClient , sentinePubSub } . Dispose ( Log ) ;
210+ new IDisposable [ ] { this . sentinelClient , sentinelPubSub } . Dispose ( Log ) ;
210211 }
211212 }
212213}
0 commit comments