From ddfa9a8ad5143aebbfdadab67ed6bd0eceb8fcf5 Mon Sep 17 00:00:00 2001 From: Chris Raborg Date: Mon, 11 Nov 2019 14:15:17 -0500 Subject: [PATCH] Update MonitorDrain comment to indicate channel is closed on errors (#6671) Fixes #6645 --- api/nodes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/nodes.go b/api/nodes.go index e4910a829..837cd149e 100644 --- a/api/nodes.go +++ b/api/nodes.go @@ -126,7 +126,7 @@ func (m *MonitorMessage) String() string { // MonitorDrain emits drain related events on the returned string channel. The // channel will be closed when all allocations on the draining node have -// stopped or the context is canceled. +// stopped, when an error occurs, or if the context is canceled. func (n *Nodes) MonitorDrain(ctx context.Context, nodeID string, index uint64, ignoreSys bool) <-chan *MonitorMessage { outCh := make(chan *MonitorMessage, 8) nodeCh := make(chan *MonitorMessage, 1)