forked from mirror/redis
Don't panic if multi bulk parser is nil
This commit is contained in:
parent
aa5f492665
commit
246d502457
|
@ -82,6 +82,10 @@ func (r *Reader) ReadReply(m MultiBulkParse) (interface{}, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if m == nil {
|
||||
err := fmt.Errorf("redis: got %.100q, but multi bulk parser is nil", line)
|
||||
return nil, err
|
||||
}
|
||||
return m(r, n)
|
||||
}
|
||||
return nil, fmt.Errorf("redis: can't parse %.100q", line)
|
||||
|
|
Loading…
Reference in New Issue