mirror of https://github.com/status-im/consul.git
agent: stop and remove docker checks
Note that there is no test since the correct way to solve (and test) this is to replace the different maps with a single one or to hide that functionality behind a separate data structure. This will be addressed in #3294. Fixes #3265
This commit is contained in:
parent
6c053d5139
commit
60540c2417
|
@ -1826,6 +1826,10 @@ func (a *Agent) RemoveCheck(checkID types.CheckID, persist bool) error {
|
||||||
check.Stop()
|
check.Stop()
|
||||||
delete(a.checkTTLs, checkID)
|
delete(a.checkTTLs, checkID)
|
||||||
}
|
}
|
||||||
|
if check, ok := a.checkDockers[checkID]; ok {
|
||||||
|
check.Stop()
|
||||||
|
delete(a.checkDockers, checkID)
|
||||||
|
}
|
||||||
if persist {
|
if persist {
|
||||||
if err := a.purgeCheck(checkID); err != nil {
|
if err := a.purgeCheck(checkID); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue