Skip to content

Commit bd0b591

Browse files
committed
nits
1 parent bdc2ea0 commit bd0b591

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/StackExchange.Redis/ResultProcessor.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,14 +1607,16 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
16071607
// RESP3 nulls are neither scalar nor aggregate
16081608
if (reader.IsNull && (reader.Prefix == RespPrefix.Null | reader.IsScalar))
16091609
{
1610-
if (reader.TryReadNext()) break; // not length 1
1611-
SetResult(message, null);
1612-
return true;
1610+
if (!reader.TryReadNext()) // only if unit, else ignore
1611+
{
1612+
SetResult(message, null);
1613+
return true;
1614+
}
16131615
}
1614-
if (reader.IsScalar && reader.TryReadInt64(out long value) && !reader.TryReadNext())
1616+
else if (reader.IsScalar && reader.TryReadInt64(out i64) && !reader.TryReadNext())
16151617
{
16161618
// treat an array of 1 like a single reply
1617-
SetResult(message, value);
1619+
SetResult(message, i64);
16181620
return true;
16191621
}
16201622
break;

0 commit comments

Comments
 (0)