Commit 149187b4 authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb/zeo: Load: Fix thinko when rejecting result

If xres fails to convert to tuple, we should error about xres, not res
which is always tuple(nil).
parent d3a0bccb
...@@ -92,7 +92,7 @@ func (z *zeo) Load(ctx context.Context, xid zodb.Xid) (buf *mem.Buf, serial zodb ...@@ -92,7 +92,7 @@ func (z *zeo) Load(ctx context.Context, xid zodb.Xid) (buf *mem.Buf, serial zodb
// (data, serial, next_serial | None) // (data, serial, next_serial | None)
res, ok := enc.asTuple(xres) res, ok := enc.asTuple(xres)
if !ok || len(res) != 3 { if !ok || len(res) != 3 {
return nil, 0, rpc.ereplyf("got %#v; expect 3-tuple", res) return nil, 0, rpc.ereplyf("got %#v; expect 3-tuple", xres)
} }
data, ok1 := enc.asBytes(res[0]) data, ok1 := enc.asBytes(res[0])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment