From 02428eeb06d6baa6fdff69eaa22a9f7edf0a610d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Mon, 21 Nov 2016 14:23:46 -0200 Subject: [PATCH] libmachine/drivers/rpc: close plugin binary even when driver server fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With this commit the RPC client driver tries closing the plugin binary even when closing the driver server fails. This prevents the driver process from entering in state when it failed before closing. Signed-off-by: André Carvalho --- libmachine/drivers/rpc/client_driver.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmachine/drivers/rpc/client_driver.go b/libmachine/drivers/rpc/client_driver.go index 17e4be09..5ce22cdc 100644 --- a/libmachine/drivers/rpc/client_driver.go +++ b/libmachine/drivers/rpc/client_driver.go @@ -213,10 +213,11 @@ func (c *RPCClientDriver) close() error { log.Debug("Making call to close driver server") if err := c.Client.Call(CloseMethod, struct{}{}, nil); err != nil { - return err + log.Debugf("Failed to make call to close driver server: %s", err) + } else { + log.Debug("Successfully made call to close driver server") } - log.Debug("Successfully made call to close driver server") log.Debug("Making call to close connection to plugin binary") return c.plugin.Close()