diff --git a/src/StackExchange.Redis/ResultProcessor.cs b/src/StackExchange.Redis/ResultProcessor.cs index afacd9e83..924f24b4c 100644 --- a/src/StackExchange.Redis/ResultProcessor.cs +++ b/src/StackExchange.Redis/ResultProcessor.cs @@ -1550,7 +1550,8 @@ protected override StreamConsumerInfo ParseItem(in RawResult result) var arr = result.GetItems(); string name = default; - int pendingMessageCount = default, idleTimeInMilliseconds = default; + int pendingMessageCount = default; + long idleTimeInMilliseconds = default; KeyValuePairParser.TryRead(arr, KeyValuePairParser.Name, ref name); KeyValuePairParser.TryRead(arr, KeyValuePairParser.Pending, ref pendingMessageCount); @@ -1566,20 +1567,30 @@ internal static readonly CommandBytes Name = "name", Consumers = "consumers", Pending = "pending", Idle = "idle", LastDeliveredId = "last-delivered-id", IP = "ip", Port = "port"; - internal static bool TryRead(Sequence pairs, in CommandBytes key, ref int value) + internal static bool TryRead(Sequence pairs, in CommandBytes key, ref long value) { var len = pairs.Length / 2; for (int i = 0; i < len; i++) { if (pairs[i * 2].IsEqual(key) && pairs[(i * 2) + 1].TryGetInt64(out var tmp)) { - value = checked((int)tmp); + value = tmp; return true; } } return false; } + internal static bool TryRead(Sequence pairs, in CommandBytes key, ref int value) + { + long tmp = default; + if(TryRead(pairs, key, ref tmp)) { + value = checked((int)tmp); + return true; + } + return false; + } + internal static bool TryRead(Sequence pairs, in CommandBytes key, ref string value) { var len = pairs.Length / 2;