[lxc-devel] [lxd/master] client: Properly reset listener on error

stgraber on Github lxc-bot at linuxcontainers.org
Wed Jan 16 15:56:49 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190116/63b148cb/attachment.bin>
-------------- next part --------------
From 73470535cc5b79aeacc2e344fb33b6f99ebf4a00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 16 Jan 2019 17:55:49 +0200
Subject: [PATCH] client: Properly reset listener on error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 client/lxd_events.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/lxd_events.go b/client/lxd_events.go
index 034ed7a4b9..6cfd7db354 100644
--- a/client/lxd_events.go
+++ b/client/lxd_events.go
@@ -82,7 +82,7 @@ func (r *ProtocolLXD) GetEvents() (*EventListener, error) {
 				}
 
 				// And remove them all from the list
-				r.eventListeners = []*EventListener{}
+				r.eventListeners = nil
 
 				conn.Close()
 				close(stopCh)


More information about the lxc-devel mailing list