mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
chore: remove unnecessary return (#4226)
This commit is contained in:
parent
4a62d084a9
commit
490559434a
@ -363,9 +363,7 @@ func newGuardedWriter[T any](ctx context.Context, channel chan<- T, done <-chan
|
|||||||
func (gw guardedWriter[T]) Write(v T) {
|
func (gw guardedWriter[T]) Write(v T) {
|
||||||
select {
|
select {
|
||||||
case <-gw.ctx.Done():
|
case <-gw.ctx.Done():
|
||||||
return
|
|
||||||
case <-gw.done:
|
case <-gw.done:
|
||||||
return
|
|
||||||
default:
|
default:
|
||||||
gw.channel <- v
|
gw.channel <- v
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user