Parcourir la source

Merge pull request #2613 from xiang90/fix_import

etcdctl: wait for goroutine existing
Xiang Li il y a 11 ans
Parent
commit
a4fefd7f73
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      etcdctl/command/import_snap_command.go

+ 1 - 0
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)
 }