DockerCLI/cli-plugins
Laura Brehm 3dcc653533
plugins: cleanup sockets when done
Since 509123f935, we've been leaking sockets
in the filesystem on platforms where abstract sockets aren't supported.

That change relied on Go to cleanup our sockets for us, which Go will happily
do as long as we make sure to close the listener, which we weren't previously
doing unless to signal the plugin to terminate.

This change adds a deferred call to `PluginServer.Close()`, which makes sure we
close the plugin server at the end of the plugin execution, so that we never exit
without cleaning up.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-06-12 11:16:10 +01:00
..
examples/helloworld cli-plugins: helloworld: rename var that collided with import 2024-01-11 22:25:15 +01:00
hooks plugins/templates: break on newlines when printing hooks 2024-04-15 12:59:53 +01:00
manager linting: fmt.Errorf can be replaced with errors.New (perfsprint) 2024-06-10 21:19:31 +02:00
plugin OTel: add `command.time` metric to plugin commands 2024-05-15 00:05:30 +01:00
socket plugins: cleanup sockets when done 2024-06-12 11:16:10 +01:00