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
1bc0acf437
commit
c8ae94b688
|
@ -1826,6 +1826,10 @@ func (a *Agent) RemoveCheck(checkID types.CheckID, persist bool) error {
|
|||
check.Stop()
|
||||
delete(a.checkTTLs, checkID)
|
||||
}
|
||||
if check, ok := a.checkDockers[checkID]; ok {
|
||||
check.Stop()
|
||||
delete(a.checkDockers, checkID)
|
||||
}
|
||||
if persist {
|
||||
if err := a.purgeCheck(checkID); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue