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