Commit 824567f4 authored by Marc Gravell's avatar Marc Gravell

Merge branch 'master' of https://github.com/deepakverma/StackExchange.Redis into deepakverma-master

Conflicts:
	StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
parents 04075c95 a4f4e8ee
......@@ -949,7 +949,16 @@ private RawResult ReadArray(byte[] buffer, ref int offset, ref int count)
if (!itemCount.TryGetInt64(out i64)) throw ExceptionFactory.ConnectionFailure(multiplexer.IncludeDetailInExceptions, ConnectionFailureType.ProtocolFailure, "Invalid array length", bridge.ServerEndPoint);
int itemCountActual = checked((int)i64);
if (itemCountActual <= 0) return RawResult.EmptyArray;
if (itemCountActual < 0)
{
//for null response by command like EXEC, RESP array: *-1\r\n
return new RawResult(ResultType.SimpleString, null, 0, 0);
}
else if (itemCountActual == 0)
{
//for zero array response by command like SCAN, Resp array: *0\r\n
return RawResult.EmptyArray;
}
var arr = new RawResult[itemCountActual];
for (int i = 0; i < itemCountActual; i++)
......
......@@ -417,6 +417,19 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
SetResult(message, false);
return true;
}
//EXEC returned with a NULL
if (!tran.IsAborted && result.IsNull)
{
connection.Multiplexer.Trace("Server aborted due to failed EXEC");
//cancel the commands in the transaction and mark them as complete with the completion manager
foreach (var op in wrapped)
{
op.Wrapped.Cancel();
bridge.CompleteSyncOrAsync(op.Wrapped);
}
SetResult(message, false);
return true;
}
break;
case ResultType.MultiBulk:
if (!tran.IsAborted)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment