@@ -201,7 +201,7 @@ private class InternalPoolImpl : IDisposable
201
201
private readonly int maxItems ;
202
202
203
203
private MemcachedNode ownerNode ;
204
- private readonly EndPoint endPoint ;
204
+ private readonly EndPoint _endPoint ;
205
205
private readonly TimeSpan queueTimeout ;
206
206
private Semaphore semaphore ;
207
207
@@ -221,7 +221,7 @@ internal InternalPoolImpl(
221
221
222
222
this . ownerNode = ownerNode ;
223
223
this . isAlive = true ;
224
- this . endPoint = ownerNode . EndPoint ;
224
+ _endPoint = ownerNode . EndPoint ;
225
225
this . queueTimeout = config . QueueTimeout ;
226
226
227
227
this . minItems = config . MinPoolSize ;
@@ -251,7 +251,7 @@ internal void InitPool()
251
251
}
252
252
253
253
if ( _logger . IsEnabled ( LogLevel . Debug ) )
254
- _logger . LogDebug ( "Pool has been inited for {0} with {1} sockets" , this . endPoint , this . minItems ) ;
254
+ _logger . LogDebug ( "Pool has been inited for {0} with {1} sockets" , _endPoint , this . minItems ) ;
255
255
256
256
}
257
257
catch ( Exception e )
@@ -289,11 +289,11 @@ public IPooledSocketResult Acquire()
289
289
var result = new PooledSocketResult ( ) ;
290
290
var message = string . Empty ;
291
291
292
- if ( _isDebugEnabled ) _logger . LogDebug ( "Acquiring stream from pool on node " + this . endPoint ) ;
292
+ if ( _isDebugEnabled ) _logger . LogDebug ( $ "Acquiring stream from pool on node ' { _endPoint } '" ) ;
293
293
294
294
if ( ! this . isAlive || this . isDisposed )
295
295
{
296
- message = "Pool is dead or disposed, returning null. " + this . endPoint ;
296
+ message = "Pool is dead or disposed, returning null. " + _endPoint ;
297
297
result . Fail ( message ) ;
298
298
299
299
if ( _isDebugEnabled ) _logger . LogDebug ( message ) ;
@@ -305,7 +305,7 @@ public IPooledSocketResult Acquire()
305
305
306
306
if ( ! this . semaphore . WaitOne ( this . queueTimeout ) )
307
307
{
308
- message = "Pool is full, timeouting. " + this . endPoint ;
308
+ message = "Pool is full, timeouting. " + _endPoint ;
309
309
if ( _isDebugEnabled ) _logger . LogDebug ( message ) ;
310
310
result . Fail ( message , new TimeoutException ( ) ) ;
311
311
@@ -316,7 +316,7 @@ public IPooledSocketResult Acquire()
316
316
// maybe we died while waiting
317
317
if ( ! this . isAlive )
318
318
{
319
- message = "Pool is dead, returning null. " + this . endPoint ;
319
+ message = "Pool is dead, returning null. " + _endPoint ;
320
320
if ( _isDebugEnabled ) _logger . LogDebug ( message ) ;
321
321
result . Fail ( message ) ;
322
322
@@ -353,7 +353,7 @@ public IPooledSocketResult Acquire()
353
353
}
354
354
355
355
// free item pool is empty
356
- message = "Could not get a socket from the pool, Creating a new item. " + this . endPoint ;
356
+ message = "Could not get a socket from the pool, Creating a new item. " + _endPoint ;
357
357
if ( _isDebugEnabled ) _logger . LogDebug ( message ) ;
358
358
359
359
@@ -368,7 +368,7 @@ public IPooledSocketResult Acquire()
368
368
}
369
369
catch ( Exception e )
370
370
{
371
- message = "Failed to create socket. " + this . endPoint ;
371
+ message = "Failed to create socket. " + _endPoint ;
372
372
_logger . LogError ( message , e ) ;
373
373
374
374
// eventhough this item failed the failure policy may keep the pool alive
@@ -389,15 +389,15 @@ public IPooledSocketResult Acquire()
389
389
390
390
private void MarkAsDead ( )
391
391
{
392
- if ( _isDebugEnabled ) _logger . LogDebug ( "Mark as dead was requested for {0}" , this . endPoint ) ;
392
+ if ( _isDebugEnabled ) _logger . LogDebug ( "Mark as dead was requested for {0}" , _endPoint ) ;
393
393
394
394
var shouldFail = ownerNode . FailurePolicy . ShouldFail ( ) ;
395
395
396
396
if ( _isDebugEnabled ) _logger . LogDebug ( "FailurePolicy.ShouldFail(): " + shouldFail ) ;
397
397
398
398
if ( shouldFail )
399
399
{
400
- if ( _logger . IsEnabled ( LogLevel . Warning ) ) _logger . LogWarning ( "Marking node {0} as dead" , this . endPoint ) ;
400
+ if ( _logger . IsEnabled ( LogLevel . Warning ) ) _logger . LogWarning ( "Marking node {0} as dead" , _endPoint ) ;
401
401
402
402
this . isAlive = false ;
403
403
this . markedAsDeadUtc = DateTime . UtcNow ;
0 commit comments