1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-18 00:20:57 +03:00

let XReadGroup skip empty message and process next message (#1244)

* let XReadGroup skip empty message and process next message
This commit is contained in:
yeplato
2020-02-02 00:49:32 -08:00
committed by GitHub
parent 7f69d5e320
commit 0fdd200bc7
2 changed files with 26 additions and 1 deletions

View File

@ -1000,10 +1000,14 @@ func xMessageSliceParser(rd *proto.Reader, n int64) (interface{}, error) {
}
v, err := rd.ReadArrayReply(stringInterfaceMapParser)
if err != nil {
if err != nil && err != proto.Nil {
return nil, err
}
if v == nil || err == proto.Nil {
v = make(map[string]interface{})
}
msgs = append(msgs, XMessage{
ID: id,
Values: v.(map[string]interface{}),