[lxc-devel] [lxd/master] operations: return true if operation is done before timeout

rmescandon on Github lxc-bot at linuxcontainers.org
Sat Sep 8 15:29:43 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 341 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180908/306d0256/attachment.bin>
-------------- next part --------------
From d061224922f6c6b41965706cf0e80e0c74c6e984 Mon Sep 17 00:00:00 2001
From: Roberto Mier Escandon <rmescandon at gmail.com>
Date: Sat, 8 Sep 2018 17:28:28 +0200
Subject: [PATCH] operations: return true if operation is done before timeout

---
 lxd/operations.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/operations.go b/lxd/operations.go
index 793df4fddb..c7112b24a6 100644
--- a/lxd/operations.go
+++ b/lxd/operations.go
@@ -340,7 +340,7 @@ func (op *operation) WaitFinal(timeout int) (bool, error) {
 		timer := time.NewTimer(time.Duration(timeout) * time.Second)
 		select {
 		case <-op.chanDone:
-			return false, nil
+			return true, nil
 
 		case <-timer.C:
 			return false, nil


More information about the lxc-devel mailing list