docker: stop previous check on replace

pull/3621/head
Frank Schroeder 7 years ago
parent e774b46f82
commit 164ec3ec39
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD

@ -1776,6 +1776,9 @@ func (a *Agent) AddCheck(check *structs.HealthCheck, chkType *structs.CheckType,
Logger: a.logger,
Client: a.dockerClient,
}
if prev := a.checkDockers[check.CheckID]; prev != nil {
prev.Stop()
}
dockerCheck.Start()
a.checkDockers[check.CheckID] = dockerCheck

Loading…
Cancel
Save