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

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

* let XReadGroup skip empty message and process next message
This commit is contained in:
yeplato
2020-02-02 00:46:20 -08:00
committed by GitHub
parent 8a0ab1aaa7
commit a8704c3bd0
2 changed files with 26 additions and 1 deletions

View File

@ -1004,10 +1004,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[i] = XMessage{
ID: id,
Values: v.(map[string]interface{}),