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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user