Skip to content

Commit 02428ee

Browse files
committed
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>
1 parent 23ae711 commit 02428ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libmachine/drivers/rpc/client_driver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,11 @@ func (c *RPCClientDriver) close() error {
213213
log.Debug("Making call to close driver server")
214214

215215
if err := c.Client.Call(CloseMethod, struct{}{}, nil); err != nil {
216-
return err
216+
log.Debugf("Failed to make call to close driver server: %s", err)
217+
} else {
218+
log.Debug("Successfully made call to close driver server")
217219
}
218220

219-
log.Debug("Successfully made call to close driver server")
220221
log.Debug("Making call to close connection to plugin binary")
221222

222223
return c.plugin.Close()

0 commit comments

Comments
 (0)