only remove keys if we have them
This commit is contained in:
parent
5689216348
commit
c2842975db
2
agent.go
2
agent.go
@ -268,6 +268,7 @@ func (t *Traygent) RemoveAll() error {
|
|||||||
return errLocked
|
return errLocked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(t.keys) > 0 {
|
||||||
t.mu.Lock()
|
t.mu.Lock()
|
||||||
klen := len(t.keys)
|
klen := len(t.keys)
|
||||||
t.keys = nil
|
t.keys = nil
|
||||||
@ -276,6 +277,7 @@ func (t *Traygent) RemoveAll() error {
|
|||||||
go func() { t.rmChan <- "all" }()
|
go func() { t.rmChan <- "all" }()
|
||||||
|
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user