etcdctl: main routine of import command should wait for goroutine existing

This commit is contained in:
Xiang Li 2015-03-31 11:53:49 -07:00 committed by Yicheng Qin
parent 7df4f5c804
commit 62ce6eef7b

View File

@ -80,6 +80,7 @@ func handleImportSnap(c *cli.Context) {
}
n := copyKeys(all.Node, setc)
close(setc)
wg.Wait()
fmt.Printf("finished importing %d keys\n", n)
}