Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NCBC-168: Don't swallow pooled socket errors

  • Loading branch information...
commit f3bb89735e1e5f9b61c6dbb54e7294b286e94a08 1 parent a6485fd
@johnzablocki johnzablocki authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 Enyim.Caching/Memcached/MemcachedNode.cs
View
7 Enyim.Caching/Memcached/MemcachedNode.cs
@@ -532,11 +532,12 @@ protected internal virtual PooledSocket CreateSocket()
//{
// PooledSocket retval = new PooledSocket(endPoint, connectionTimeout, receiveTimeout);
- // return retval;
+ // return retval;dis
//}
protected virtual IPooledSocketResult ExecuteOperation(IOperation op)
{
+ IOperationResult readResult = new BinaryOperationResult();
var result = this.Acquire();
if (result.Success && result.HasValue)
{
@@ -547,7 +548,7 @@ protected virtual IPooledSocketResult ExecuteOperation(IOperation op)
socket.Write(b);
- var readResult = op.ReadResponse(socket);
+ readResult = op.ReadResponse(socket);
if (readResult.Success)
{
result.Pass();
@@ -572,7 +573,7 @@ protected virtual IPooledSocketResult ExecuteOperation(IOperation op)
}
else
{
- result.Fail("Failed to obtain socket from pool");
+ readResult.Combine(result);
return result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.