mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
fixed config reload
This commit is contained in:
parent
0397f69853
commit
369cdf8c4f
3 changed files with 7 additions and 2 deletions
|
@ -148,8 +148,10 @@ func (r *HTTPRoute) Start(providerSubtask task.Task) E.Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.HealthMon != nil {
|
if r.HealthMon != nil {
|
||||||
if err := r.HealthMon.Start(r.task.Subtask("health monitor")); err != nil {
|
healthMonTask := r.task.Subtask("health monitor")
|
||||||
|
if err := r.HealthMon.Start(healthMonTask); err != nil {
|
||||||
E.LogWarn("health monitor error", err, &r.l)
|
E.LogWarn("health monitor error", err, &r.l)
|
||||||
|
healthMonTask.Finish(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,10 @@ func (r *StreamRoute) Start(providerSubtask task.Task) E.Error {
|
||||||
Msg("listening")
|
Msg("listening")
|
||||||
|
|
||||||
if r.HealthMon != nil {
|
if r.HealthMon != nil {
|
||||||
if err := r.HealthMon.Start(r.task.Subtask("health monitor")); err != nil {
|
healthMonTask := r.task.Subtask("health monitor")
|
||||||
|
if err := r.HealthMon.Start(healthMonTask); err != nil {
|
||||||
E.LogWarn("health monitor error", err, &r.l)
|
E.LogWarn("health monitor error", err, &r.l)
|
||||||
|
healthMonTask.Finish(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,7 @@ func (mon *monitor) Start(routeSubtask task.Task) E.Error {
|
||||||
if mon.status.Load() != StatusError {
|
if mon.status.Load() != StatusError {
|
||||||
mon.status.Store(StatusUnknown)
|
mon.status.Store(StatusUnknown)
|
||||||
}
|
}
|
||||||
|
mon.task.Finish(nil)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if err := mon.checkUpdateHealth(); err != nil {
|
if err := mon.checkUpdateHealth(); err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue