Merge pull request #162 from thaJeztah/18.09_backport_38636_fix_nil_pointer_dereference
[18.09 backport] Fix nil pointer derefence on failure to connect to containerd Upstream-commit: 24c6c3eb52e04835da52efe940fef725bed445ee Component: engine
This commit is contained in:
@ -311,6 +311,8 @@ func (r *remote) monitorDaemon(ctx context.Context) {
|
||||
delay = time.After(time.Duration(transientFailureCount) * 200 * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
client.Close()
|
||||
client = nil
|
||||
}
|
||||
|
||||
if system.IsProcessAlive(r.daemonPid) {
|
||||
@ -318,8 +320,6 @@ func (r *remote) monitorDaemon(ctx context.Context) {
|
||||
r.killDaemon()
|
||||
}
|
||||
|
||||
client.Close()
|
||||
client = nil
|
||||
r.daemonPid = -1
|
||||
delay = nil
|
||||
transientFailureCount = 0
|
||||
|
||||
Reference in New Issue
Block a user