From 2849edb0ecedb5007bcb080c71e0570a3c1f2e8c Mon Sep 17 00:00:00 2001 From: Wentao Zhang Date: Thu, 4 May 2017 00:18:26 +0800 Subject: [PATCH] fix when rpc reports "transport is closing" error, health check go routine will exit Signed-off-by: Wentao Zhang Upstream-commit: 60742f9a95cb5eff549a873a53724863f1ab20e2 Component: engine --- components/engine/libcontainerd/remote_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/libcontainerd/remote_unix.go b/components/engine/libcontainerd/remote_unix.go index eebbc886c6..eff2b0d17a 100644 --- a/components/engine/libcontainerd/remote_unix.go +++ b/components/engine/libcontainerd/remote_unix.go @@ -154,7 +154,7 @@ func (r *remote) handleConnectionChange() { logrus.Debugf("libcontainerd: containerd health check returned error: %v", err) if r.daemonPid != -1 { - if strings.Contains(err.Error(), "is closing") { + if r.closeManually { // Well, we asked for it to stop, just return return }