Unverified Commit 8a9ada91 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #74 from ipfs/fix/close-query-on-move

fix: close query when finished moving
parents 8e4cd220 a7dbfb26
......@@ -76,11 +76,13 @@ func Move(oldPath string, newPath string, out io.Writer) error {
break
}
if e.Error != nil {
res.Close()
return e.Error
}
err := moveKey(oldDS, newDS, datastore.RawKey(e.Key))
if err != nil {
res.Close()
return err
}
......@@ -89,6 +91,7 @@ func Move(oldPath string, newPath string, out io.Writer) error {
fmt.Fprintf(out, "\r%d keys so far", count)
}
}
res.Close()
if out != nil {
fmt.Fprintf(out, "\nCleaning Up...\n")
......
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