The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4303

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: St├ęphane Graber <stgra...@ubuntu.com>
From 750694e890d929a0dbccd3521b498e48cc091c9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Tue, 6 Mar 2018 23:14:48 +0100
Subject: [PATCH] lxd/shutdown: Fix error string check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgra...@ubuntu.com>
---
 lxd/main_shutdown.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/main_shutdown.go b/lxd/main_shutdown.go
index 3de15e3ec0..53f80366b2 100644
--- a/lxd/main_shutdown.go
+++ b/lxd/main_shutdown.go
@@ -2,7 +2,7 @@ package main
 
 import (
        "fmt"
-       "io"
+       "strings"
        "time"
 
        "github.com/lxc/lxd/client"
@@ -18,7 +18,7 @@ func cmdShutdown(args *Args) error {
        }
 
        _, _, err = c.RawQuery("PUT", "/internal/shutdown", nil, "")
-       if err != nil && err != io.EOF {
+       if err != nil && strings.HasSuffix(err.Error(), ": EOF") {
                // NOTE: if we got an EOF error here it means that the daemon
                // has shutdown so quickly that it already closed the unix
                // socket. We consider the daemon dead in this case.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to