Skip to content

Commit

Permalink
a few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Dec 5, 2024
1 parent 9c8036b commit d931a8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions engine/plugins/ip_netblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion engine/plugins/service_discovery/http_probes/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d931a8b

Please sign in to comment.