hashicorp / go-plugin

Golang plugin system over RPC.
Mozilla Public License 2.0
5.25k stars 450 forks source link

client.Kill() should close connections in Test mode #215

Open RealFatCat opened 2 years ago

RealFatCat commented 2 years ago

Hi, For now, if plugin runs in test mode, client will not close its connections, because of this check, that process == nil runs early: https://github.com/hashicorp/go-plugin/blob/master/client.go#L414

This can cause memory leaks in plugin.

Original issue in terraform-provider-aws: https://github.com/hashicorp/terraform-provider-aws/issues/26130