libmachine/drivers/rpc: close plugin binary even when driver server fails

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 <defunct> state when it failed before closing.

Signed-off-by: André Carvalho <asantostc@gmail.com>
This commit is contained in:
André Carvalho
2016-11-21 14:23:46 -02:00
parent 23ae71164f
commit 02428eeb06
+3 -2
View File
@@ -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()