some fixes
This commit is contained in:
parent
13a64cecfe
commit
1075b3215c
4 changed files with 24 additions and 7 deletions
|
|
@ -53,8 +53,12 @@ func NewPreloadHandler(ctx context.Context, fs *FS, max int, log logr.Logger) (p
|
|||
func (ph *PreloadHandler) CancelPreload(name string) {
|
||||
ph.mu.Lock()
|
||||
defer ph.mu.Unlock()
|
||||
if p, ok := ph.pm[name]; ok && p.Running {
|
||||
p.cancel()
|
||||
p, ok := ph.pm[name]
|
||||
if ok {
|
||||
if p.Running {
|
||||
p.cancel()
|
||||
}
|
||||
delete(ph.pm, name)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue