Skip to content

Commit

Permalink
Fix send on closed channel panic (#5613)
Browse files Browse the repository at this point in the history
Signed-off-by: Changxin Miao <miaochangxin@step.ai>
  • Loading branch information
polyrabbit authored Jan 26, 2025
1 parent 487c5a0 commit 19fde77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/meta/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2407,7 +2407,11 @@ func (m *baseMeta) deleteSlice(id uint64, size uint32) {
return
}
if m.dslices != nil {
m.dslices <- Slice{Id: id, Size: size}
select {
case <-m.sessCtx.Done():
return
case m.dslices <- Slice{Id: id, Size: size}:
}
} else {
m.deleteSlice_(id, size)
}
Expand Down

0 comments on commit 19fde77

Please sign in to comment.