mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-09-26 12:14:17 -04:00
moving health ping to observatory as a standalone component
This commit is contained in:
@@ -114,25 +114,11 @@ func (r *Router) pickRouteInternal(ctx routing.Context) (*Rule, routing.Context,
|
||||
|
||||
// Start implements common.Runnable.
|
||||
func (r *Router) Start() error {
|
||||
for _, b := range r.balancers {
|
||||
checker, ok := b.strategy.(routing.HealthChecker)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
checker.StartScheduler(b.SelectOutbounds)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close implements common.Closable.
|
||||
func (r *Router) Close() error {
|
||||
for _, b := range r.balancers {
|
||||
checker, ok := b.strategy.(routing.HealthChecker)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
checker.StopScheduler()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user