mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: avoid go-routine leak (#934)
This commit is contained in:
@@ -40,7 +40,7 @@ func SecureGRPCRunnerFactory(addr, runnerCertCN string, pki *pool.PKIData) (pool
|
|||||||
// Close waits until the context is closed for all inflight requests
|
// Close waits until the context is closed for all inflight requests
|
||||||
// to complete prior to terminating the underlying grpc connection
|
// to complete prior to terminating the underlying grpc connection
|
||||||
func (r *gRPCRunner) Close(ctx context.Context) error {
|
func (r *gRPCRunner) Close(ctx context.Context) error {
|
||||||
err := make(chan error)
|
err := make(chan error, 1)
|
||||||
go func() {
|
go func() {
|
||||||
defer close(err)
|
defer close(err)
|
||||||
r.wg.Wait()
|
r.wg.Wait()
|
||||||
|
|||||||
Reference in New Issue
Block a user