@@ -29,7 +29,7 @@ public class MemcachedNode : IMemcachedNode
29
29
private bool isDisposed ;
30
30
31
31
private readonly EndPoint _endPoint ;
32
- private readonly ISocketPoolConfiguration config ;
32
+ private readonly ISocketPoolConfiguration _config ;
33
33
private InternalPoolImpl internalPoolImpl ;
34
34
private bool isInitialized = false ;
35
35
private SemaphoreSlim poolInitSemaphore = new SemaphoreSlim ( 1 , 1 ) ;
@@ -42,7 +42,7 @@ public MemcachedNode(
42
42
{
43
43
_endPoint = endpoint ;
44
44
EndPointString = endpoint ? . ToString ( ) . Replace ( "Unspecified/" , string . Empty ) ;
45
- this . config = socketPoolConfig ;
45
+ _config = socketPoolConfig ;
46
46
47
47
if ( socketPoolConfig . ConnectionTimeout . TotalMilliseconds >= Int32 . MaxValue )
48
48
throw new InvalidOperationException ( "ConnectionTimeout must be < Int32.MaxValue" ) ;
@@ -65,7 +65,7 @@ public MemcachedNode(
65
65
66
66
protected INodeFailurePolicy FailurePolicy
67
67
{
68
- get { return this . failurePolicy ?? ( this . failurePolicy = this . config . FailurePolicyFactory . Create ( this ) ) ; }
68
+ get { return this . failurePolicy ?? ( this . failurePolicy = _config . FailurePolicyFactory . Create ( this ) ) ; }
69
69
}
70
70
71
71
/// <summary>
@@ -121,7 +121,7 @@ public bool Ping()
121
121
// it's easier to create a new pool than reinitializing a dead one
122
122
// rewrite-then-dispose to avoid a race condition with Acquire (which does no locking)
123
123
var oldPool = this . internalPoolImpl ;
124
- var newPool = new InternalPoolImpl ( this , this . config , _logger ) ;
124
+ var newPool = new InternalPoolImpl ( this , _config , _logger ) ;
125
125
126
126
Interlocked . Exchange ( ref this . internalPoolImpl , newPool ) ;
127
127
@@ -774,7 +774,7 @@ protected internal virtual PooledSocket CreateSocket()
774
774
{
775
775
try
776
776
{
777
- var ps = new PooledSocket ( _endPoint , this . config . ConnectionTimeout , this . config . ReceiveTimeout , _logger ) ;
777
+ var ps = new PooledSocket ( _endPoint , _config . ConnectionTimeout , _config . ReceiveTimeout , _logger ) ;
778
778
ps . Connect ( ) ;
779
779
return ps ;
780
780
}
@@ -790,7 +790,7 @@ protected internal virtual async Task<PooledSocket> CreateSocketAsync()
790
790
{
791
791
try
792
792
{
793
- var ps = new PooledSocket ( _endPoint , this . config . ConnectionTimeout , this . config . ReceiveTimeout , _logger ) ;
793
+ var ps = new PooledSocket ( _endPoint , _config . ConnectionTimeout , _config . ReceiveTimeout , _logger ) ;
794
794
await ps . ConnectAsync ( ) ;
795
795
return ps ;
796
796
}
0 commit comments