@@ -12,8 +12,9 @@ internal class RedisSentinelWorker : IDisposable
12
12
static int IdCounter = 0 ;
13
13
public int Id { get ; }
14
14
15
- private readonly object oLock = new object ( ) ;
15
+ private readonly object oLock = new ( ) ;
16
16
17
+ private readonly RedisEndpoint sentinelEndpoint ;
17
18
private readonly RedisSentinel sentinel ;
18
19
private readonly RedisClient sentinelClient ;
19
20
private RedisPubSubServer sentinePubSub ;
@@ -32,7 +33,7 @@ public RedisSentinelWorker(RedisSentinel sentinel, RedisEndpoint sentinelEndpoin
32
33
} ;
33
34
34
35
if ( Log . IsDebugEnabled )
35
- Log . Debug ( "Set up Redis Sentinel on {0}" . Fmt ( sentinelEndpoint ) ) ;
36
+ Log . Debug ( $ "Set up Redis Sentinel on { sentinelEndpoint } " ) ;
36
37
}
37
38
38
39
/// <summary>
@@ -43,7 +44,7 @@ public RedisSentinelWorker(RedisSentinel sentinel, RedisEndpoint sentinelEndpoin
43
44
private void SentinelMessageReceived ( string channel , string message )
44
45
{
45
46
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") ;
47
48
48
49
// {+|-}sdown is the event for server coming up or down
49
50
var c = channel . ToLower ( ) ;
@@ -61,7 +62,7 @@ private void SentinelMessageReceived(string channel, string message)
61
62
|| ( sentinel . ResetWhenObjectivelyDown && isObjectivelyDown ) )
62
63
{
63
64
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 } " ) ;
65
66
66
67
sentinel . ResetClients ( ) ;
67
68
}
@@ -187,7 +188,7 @@ public void BeginListeningForConfigurationChanges()
187
188
}
188
189
}
189
190
190
- this . sentinePubSub . Start ( ) ;
191
+ this . sentinelPubSub . Start ( ) ;
191
192
}
192
193
catch ( Exception ex )
193
194
{
@@ -206,7 +207,7 @@ public void ForceMasterFailover(string masterName)
206
207
207
208
public void Dispose ( )
208
209
{
209
- new IDisposable [ ] { this . sentinelClient , sentinePubSub } . Dispose ( Log ) ;
210
+ new IDisposable [ ] { this . sentinelClient , sentinelPubSub } . Dispose ( Log ) ;
210
211
}
211
212
}
212
213
}
0 commit comments