listen ctx for closing object
This commit is contained in:
parent
703bf4fda6
commit
f858d39534
@ -176,8 +176,12 @@ Load:
|
|||||||
}
|
}
|
||||||
c.mu.Unlock()
|
c.mu.Unlock()
|
||||||
if closing {
|
if closing {
|
||||||
<-e.close
|
select {
|
||||||
goto Load
|
case <-ctx.Done():
|
||||||
|
return nil, ctx.Err()
|
||||||
|
case <-e.close:
|
||||||
|
goto Load
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if load {
|
if load {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user