소스 검색

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

Xiang Li 11 년 전
부모
커밋
1024f587e0
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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)
 }