Skip to content

Commit

Permalink
Fix MultiGetKey function (#2824)
Browse files Browse the repository at this point in the history
Fixes #2797
  • Loading branch information
komalsukhani authored and buger committed Jan 26, 2020
1 parent 0b54d56 commit 2ebfe1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gateway/rpc_storage_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,17 @@ func (r *RPCStorageHandler) GetRawKey(keyName string) (string, error) {
}

func (r *RPCStorageHandler) GetMultiKey(keyNames []string) ([]string, error) {
var err error
var value string

for _, key := range keyNames {
if value, err := r.GetKey(key); err != nil {
return nil, err
} else {
value, err = r.GetKey(key)
if err == nil {
return []string{value}, nil
}
}

return nil, nil
return nil, err
}

func (r *RPCStorageHandler) GetExp(keyName string) (int64, error) {
Expand Down

0 comments on commit 2ebfe1d

Please sign in to comment.