Ensure to close StreamFrame channel (#12248)

This commit is contained in:
Ryo Nakao 2022-03-28 23:28:23 +09:00 committed by GitHub
parent bc455fc69c
commit e11894a0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

3
.changelog/12248.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
api: `AllocFS.Logs` now explicitly closes frames channel after being canceled
```

View File

@ -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:
}