1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

fix the reading of the "entries-read" field in XInfoStreamFull (#2595)

* fix:  In the response of the XInfoStreamFull command, the "entries-read" field may be nil

Signed-off-by: monkey92t <golang@88.com>

* add XInfoStreamFull test

Signed-off-by: monkey92t <golang@88.com>

* add test XInfoStreamFull entries_read = nil

Signed-off-by: monkey92t <golang@88.com>

---------

Signed-off-by: monkey92t <golang@88.com>
This commit is contained in:
Monkey
2023-05-29 13:40:45 +08:00
committed by GitHub
parent 9a9423d3df
commit 6f0af685cf
2 changed files with 92 additions and 1 deletions

View File

@ -2373,7 +2373,7 @@ func readStreamGroups(rd *proto.Reader) ([]XInfoStreamGroup, error) {
}
case "entries-read":
group.EntriesRead, err = rd.ReadInt()
if err != nil {
if err != nil && err != Nil {
return nil, err
}
case "lag":