From 62ce6eef7b9dd0aec2b579b0288f5d939e5e213c Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 31 Mar 2015 11:53:49 -0700 Subject: [PATCH] etcdctl: main routine of import command should wait for goroutine existing --- etcdctl/command/import_snap_command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/etcdctl/command/import_snap_command.go b/etcdctl/command/import_snap_command.go index 0adae55e7..ad431bda9 100644 --- a/etcdctl/command/import_snap_command.go +++ b/etcdctl/command/import_snap_command.go @@ -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) }