Skip to content

Commit

Permalink
Ensure to close StreamFrame channel (#12248)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne authored Mar 28, 2022
1 parent 167cfcd commit 97dc687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/12248.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
api: `AllocFS.Logs` now explicitly closes frames channel after being canceled
```
1 change: 1 addition & 0 deletions api/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
}
Expand Down

0 comments on commit 97dc687

Please sign in to comment.