Permalink
Browse files

NCBC-168: Don't swallow pooled socket errors

  • Loading branch information...
1 parent a6485fd commit f3bb89735e1e5f9b61c6dbb54e7294b286e94a08 @johnzablocki johnzablocki committed Nov 27, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 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;
}

0 comments on commit f3bb897

Please sign in to comment.