Set d.e to true when closing

This commit is contained in:
Melon 2023-04-17 20:24:25 +01:00
parent 19e73684aa
commit 792fc8d2df
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ func NewDoneChan() *DoneChan {
func (d *DoneChan) Close() {
d.m.Lock()
if !d.e {
d.e = true
close(d.C)
}
d.m.Unlock()