From 73d26fbe22b4294b86ba91f4ebd643814cebb144 Mon Sep 17 00:00:00 2001 From: nakabonne Date: Wed, 9 Mar 2022 17:50:53 +0900 Subject: [PATCH 1/2] Ensure to close StreamFrame channel --- api/fs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/fs.go b/api/fs.go index e5340c9668b..e0a8383e9fb 100644 --- a/api/fs.go +++ b/api/fs.go @@ -257,6 +257,7 @@ func (a *AllocFS) Logs(alloc *Allocation, follow bool, task, logType, origin str // Check if we have been cancelled select { case <-cancel: + close(frames) return default: } From e7240100b0ad2d637ea3e995157194ce0c12d6a4 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Mon, 28 Mar 2022 10:09:04 -0400 Subject: [PATCH 2/2] changelog entry --- .changelog/12248.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/12248.txt diff --git a/.changelog/12248.txt b/.changelog/12248.txt new file mode 100644 index 00000000000..5931f72d394 --- /dev/null +++ b/.changelog/12248.txt @@ -0,0 +1,3 @@ +```release-note:improvement +api: `AllocFS.Logs` now explicitly closes frames channel after being canceled +```