Skip to content

Commit

Permalink
Merge pull request etcd-io#12797 from lzhfromustc/3_23
Browse files Browse the repository at this point in the history
server/etcdmain and tests: Fix goroutine leaks
  • Loading branch information
ptabor authored May 10, 2021
2 parents aeb9b5f + 3de6b38 commit f571701
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/etcdmain/grpc_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func startGRPCProxy(cmd *cobra.Command, args []string) {
httpClient := mustNewHTTPClient(lg)

srvhttp, httpl := mustHTTPListener(lg, m, tlsinfo, client, proxyClient)
errc := make(chan error)
errc := make(chan error, 3)
go func() { errc <- newGRPCProxyServer(lg, client).Serve(grpcl) }()
go func() { errc <- srvhttp.Serve(httpl) }()
go func() { errc <- m.Serve() }()
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/snapshot/v3_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func restoreCluster(t *testing.T, clusterN int, dbPath string) (
cfgs[i] = cfg
}

sch := make(chan *embed.Etcd)
sch := make(chan *embed.Etcd, len(cfgs))
for i := range cfgs {
go func(idx int) {
srv, err := embed.StartEtcd(cfgs[idx])
Expand Down

0 comments on commit f571701

Please sign in to comment.