Unverified Commit 663a896f authored by Jerome Küttner's avatar Jerome Küttner Committed by Matt Farina
Browse files

Channel should remain open if there is still a routine that wants to write into it

Signed-off-by: default avatarJerome Küttner <j.kuettner@mittwald.de>
(cherry picked from commit 9a492f82)
parent 95c03eec
Showing with 4 additions and 6 deletions
+4 -6
......@@ -325,15 +325,13 @@ func (u *Upgrade) performUpgrade(ctx context.Context, originalRelease, upgradedR
doneChan := make(chan interface{})
go u.releasingUpgrade(rChan, upgradedRelease, current, target, originalRelease)
go u.handleContext(ctx, doneChan, ctxChan, upgradedRelease)
var result resultMessage
select {
case result = <-rChan:
case result := <-rChan:
doneChan <- true
case result = <-ctxChan:
close(rChan)
return result.r, result.e
case result := <-ctxChan:
return result.r, result.e
}
return result.r, result.e
}
// Function used to lock the Mutex, this is important for the case when the atomic flag is set.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment