1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00
fix #1758
This commit is contained in:
monkey92t
2021-05-19 16:52:13 +08:00
committed by GitHub
parent 76393b5b71
commit 1393126c29
2 changed files with 27 additions and 1 deletions

View File

@ -1769,8 +1769,14 @@ func xStreamInfoParser(rd *proto.Reader, n int64) (interface{}, error) {
info.LastGeneratedID, err = rd.ReadString()
case "first-entry":
info.FirstEntry, err = readXMessage(rd)
if err == Nil {
err = nil
}
case "last-entry":
info.LastEntry, err = readXMessage(rd)
if err == Nil {
err = nil
}
default:
return nil, fmt.Errorf("redis: unexpected content %s "+
"in XINFO STREAM reply", key)
@ -2034,7 +2040,7 @@ func readXInfoStreamConsumers(rd *proto.Reader) ([]XInfoStreamConsumer, error) {
c.Pending = make([]XInfoStreamConsumerPending, 0, pendingNumber)
for f := 0; f < pendingNumber; f++ {
for pn := 0; pn < pendingNumber; pn++ {
nn, err := rd.ReadArrayLen()
if err != nil {
return nil, err