From d0041c55a37579b3f5fab5ada00157555082c1ce Mon Sep 17 00:00:00 2001 From: yeqown Date: Sun, 30 Jul 2023 15:50:55 +0800 Subject: [PATCH] fix(274): ignore empty data to append to msgs fix issue 274 --- internal/rdb/rdb.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/rdb/rdb.go b/internal/rdb/rdb.go index c79a9c5..d200517 100644 --- a/internal/rdb/rdb.go +++ b/internal/rdb/rdb.go @@ -1305,6 +1305,9 @@ func (r *RDB) ListLeaseExpired(cutoff time.Time, qnames ...string) ([]*base.Task return nil, errors.E(op, errors.Internal, fmt.Sprintf("cast error: Lua script returned unexpected value: %v", res)) } for _, s := range data { + if len(s) == 0 { + continue + } msg, err := base.DecodeMessage([]byte(s)) if err != nil { return nil, errors.E(op, errors.Internal, fmt.Sprintf("cannot decode message: %v", err))