From 89ab34a774b0f99d823232e8dc7b1ed2eda0cd3a Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Fri, 22 Apr 2022 12:46:45 +0800 Subject: [PATCH] v0.5.1 fix: XPening null bug #92 --- src/FreeRedis/FreeRedis.csproj | 2 +- src/FreeRedis/RedisClient/Streams.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FreeRedis/FreeRedis.csproj b/src/FreeRedis/FreeRedis.csproj index c1525bd1..f1d3a139 100644 --- a/src/FreeRedis/FreeRedis.csproj +++ b/src/FreeRedis/FreeRedis.csproj @@ -5,7 +5,7 @@ FreeRedis FreeRedis FreeRedis - 0.5.0 + 0.5.1 true https://github.com/2881099/FreeRedis FreeRedis is .NET redis client, supports cluster, sentinel, master-slave, pipeline, transaction and connection pool. diff --git a/src/FreeRedis/RedisClient/Streams.cs b/src/FreeRedis/RedisClient/Streams.cs index 17271cdf..111f64e2 100644 --- a/src/FreeRedis/RedisClient/Streams.cs +++ b/src/FreeRedis/RedisClient/Streams.cs @@ -297,6 +297,7 @@ public static StreamsXPendingResult ThrowOrValueToXPending(this RedisResult rt) if (a?.Any() != true) return null; var ret = new StreamsXPendingResult { count = a[0].ConvertTo(), minId = a[1].ConvertTo(), maxId = a[2].ConvertTo() }; var objs1 = a[3] as object[]; + if (objs1 == null) objs1 = new object[0]; ret.consumers = new StreamsXPendingResult.Consumer[objs1.Length]; for (var z = 0; z < objs1.Length; z++) {