close grpc connections during errors
This commit is contained in:
@@ -81,6 +81,7 @@ func WithCachedGrpcClient(ctx context.Context, fn func(*grpc.ClientConn) error,
|
|||||||
grpcClientsLock.Lock()
|
grpcClientsLock.Lock()
|
||||||
delete(grpcClients, address)
|
delete(grpcClients, address)
|
||||||
grpcClientsLock.Unlock()
|
grpcClientsLock.Unlock()
|
||||||
|
grpcConnection.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user