Update MonitorDrain comment to indicate channel is closed on errors (#6671)

Fixes #6645
This commit is contained in:
Chris Raborg
2019-11-11 14:15:17 -05:00
committed by Tim Gross
parent 3fea25bf30
commit ddfa9a8ad5

View File

@@ -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)