return lua error in eval

This commit is contained in:
siddontang 2014-09-03 07:49:46 +08:00
parent de284bab4d
commit d9a8da770d
1 changed files with 5 additions and 0 deletions

View File

@ -99,6 +99,11 @@ func evalGenericCommand(c *client, evalSha1 bool) error {
} else { } else {
r := luaReplyToLedisReply(l) r := luaReplyToLedisReply(l)
m.Close() m.Close()
if v, ok := r.(error); ok {
return v
}
writeValue(c.resp, r) writeValue(c.resp, r)
} }