1+ using Enyim . Caching . Configuration ;
2+ using Enyim . Caching . Memcached . Protocol . Binary ;
3+ using Enyim . Caching . Memcached . Results ;
4+ using Enyim . Caching . Memcached . Results . Extensions ;
5+ using Enyim . Collections ;
6+ using Microsoft . Extensions . Logging ;
17using System ;
28using System . Collections . Generic ;
39using System . Diagnostics ;
10+ using System . IO ;
411using System . Net ;
5- using System . Threading ;
6- using Enyim . Caching . Configuration ;
7- using Enyim . Collections ;
8- using System . Security ;
9- using Enyim . Caching . Memcached . Protocol . Binary ;
1012using System . Runtime . Serialization ;
11- using System . IO ;
12- using Enyim . Caching . Memcached . Results ;
13- using Enyim . Caching . Memcached . Results . Extensions ;
13+ using System . Security ;
14+ using System . Threading ;
1415using System . Threading . Tasks ;
15- using Microsoft . Extensions . Logging ;
1616
1717namespace Enyim . Caching . Memcached
1818{
@@ -27,13 +27,13 @@ public class MemcachedNode : IMemcachedNode
2727
2828 private bool isDisposed ;
2929
30- private DnsEndPoint endPoint ;
31- private ISocketPoolConfiguration config ;
30+ private readonly DnsEndPoint endPoint ;
31+ private readonly ISocketPoolConfiguration config ;
3232 private InternalPoolImpl internalPoolImpl ;
3333 private bool isInitialized ;
3434
3535 public MemcachedNode (
36- DnsEndPoint endpoint ,
36+ DnsEndPoint endpoint ,
3737 ISocketPoolConfiguration socketPoolConfig ,
3838 ILogger logger )
3939 {
@@ -186,7 +186,7 @@ void IDisposable.Dispose()
186186 private class InternalPoolImpl : IDisposable
187187 {
188188 private readonly ILogger _logger ;
189- private bool _isDebugEnabled ;
189+ private readonly bool _isDebugEnabled ;
190190
191191 /// <summary>
192192 /// A list of already connected but free to use sockets
@@ -197,18 +197,18 @@ private class InternalPoolImpl : IDisposable
197197 private bool isAlive ;
198198 private DateTime markedAsDeadUtc ;
199199
200- private int minItems ;
201- private int maxItems ;
200+ private readonly int minItems ;
201+ private readonly int maxItems ;
202202
203203 private MemcachedNode ownerNode ;
204- private EndPoint endPoint ;
205- private TimeSpan queueTimeout ;
204+ private readonly EndPoint endPoint ;
205+ private readonly TimeSpan queueTimeout ;
206206 private Semaphore semaphore ;
207207
208- private object initLock = new Object ( ) ;
208+ private readonly object initLock = new Object ( ) ;
209209
210210 internal InternalPoolImpl (
211- MemcachedNode ownerNode ,
211+ MemcachedNode ownerNode ,
212212 ISocketPoolConfiguration config ,
213213 ILogger logger )
214214 {
@@ -519,9 +519,9 @@ protected internal virtual PooledSocket CreateSocket()
519519 {
520520 return new PooledSocket ( this . endPoint , this . config . ConnectionTimeout , this . config . ReceiveTimeout , _logger ) ;
521521 }
522- catch ( Exception ex )
522+ catch ( Exception ex )
523523 {
524- _logger . LogError ( new EventId ( this . GetHashCode ( ) , nameof ( MemcachedNode ) ) , ex , $ "Create { nameof ( PooledSocket ) } ") ;
524+ _logger . LogError ( new EventId ( this . GetHashCode ( ) , nameof ( MemcachedNode ) ) , ex , $ "Create { nameof ( PooledSocket ) } ") ;
525525 throw ;
526526 }
527527 }
@@ -582,12 +582,16 @@ protected virtual IPooledSocketResult ExecuteOperation(IOperation op)
582582
583583 protected async virtual Task < IPooledSocketResult > ExecuteOperationAsync ( IOperation op )
584584 {
585+ _logger . LogDebug ( $ "ExecuteOperationAsync({ op } )") ;
586+
585587 var result = this . Acquire ( ) ;
586588 if ( result . Success && result . HasValue )
587589 {
588590 try
589591 {
590592 var pooledSocket = result . Value ;
593+
594+
591595 //if Get, call BinaryRequest.CreateBuffer()
592596 var b = op . GetBuffer ( ) ;
593597
0 commit comments