diff --git a/engine/plugins/ip_netblock.go b/engine/plugins/ip_netblock.go index 557c6b75..2e9c3f98 100644 --- a/engine/plugins/ip_netblock.go +++ b/engine/plugins/ip_netblock.go @@ -39,12 +39,13 @@ func (d *ipNetblock) Start(r et.Registry) error { name := d.name + "-Handler" if err := r.RegisterHandler(&et.Handler{ - Plugin: d, - Name: name, - Priority: 4, - Transforms: []string{string(oam.Netblock)}, - EventType: oam.IPAddress, - Callback: d.lookup, + Plugin: d, + Name: name, + Priority: 4, + MaxInstances: support.MaxHandlerInstances, + Transforms: []string{string(oam.Netblock)}, + EventType: oam.IPAddress, + Callback: d.lookup, }); err != nil { d.log.Error(fmt.Sprintf("Failed to register a handler: %v", err), "handler", name) return err diff --git a/engine/plugins/service_discovery/http_probes/plugin.go b/engine/plugins/service_discovery/http_probes/plugin.go index 473b9289..403bcc06 100644 --- a/engine/plugins/service_discovery/http_probes/plugin.go +++ b/engine/plugins/service_discovery/http_probes/plugin.go @@ -99,7 +99,7 @@ func (hp *httpProbing) Stop() { func (hp *httpProbing) query(e *et.Event, entity *dbt.Entity, target string, port int) []*support.Finding { var findings []*support.Finding - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() if resp, err := http.RequestWebPage(ctx, &http.Request{URL: target}); err == nil && resp != nil {