Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Jun 11, 2024
1 parent bc16ae8 commit ac0107c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion internal/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/projectdiscovery/nuclei/v3/pkg/utils/yaml"
fileutil "github.com/projectdiscovery/utils/file"
"github.com/projectdiscovery/utils/generic"
logutil "github.com/projectdiscovery/utils/log"
stringsutil "github.com/projectdiscovery/utils/strings"
)

Expand Down Expand Up @@ -341,7 +342,7 @@ func configureOutput(options *types.Options) {
}

// disable standard logger (ref: https://github.com/golang/go/issues/19895)
// logutil.DisableDefaultLogger()
logutil.DisableDefaultLogger()
}

// loadResolvers loads resolvers from both user-provided flags and file
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/execute_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (e *Engine) ExecuteScanWithOpts(ctx context.Context, templatesList []*templ
}

// Execute All SelfContained in parallel
// e.executeAllSelfContained(ctx, selfContained, results, selfcontainedWg)
e.executeAllSelfContained(ctx, selfContained, results, selfcontainedWg)

strategyResult := &atomic.Bool{}
switch e.options.ScanStrategy {
Expand Down
3 changes: 1 addition & 2 deletions pkg/installer/versioncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func getpdtmParams(isSDK bool) string {

// UpdateIgnoreFile updates default ignore file by downloading latest ignore file
func UpdateIgnoreFile() error {
return nil
resp, err := retryableHttpClient.Get(pdtmNucleiIgnoreFileEndpoint + "?" + getpdtmParams(false))
if err != nil {
return err
Expand All @@ -84,11 +83,11 @@ func UpdateIgnoreFile() error {
}

func doVersionCheck(isSDK bool) error {
return nil
// we use global retryablehttp client so its not immeditely gc'd if any references are held
// and according our config we have idle connections which are shown as leaked by goleak in tests
// i.e we close all idle connections after our use and it doesn't affect any other part of the code
defer retryableHttpClient.HTTPClient.CloseIdleConnections()

resp, err := retryableHttpClient.Get(pdtmNucleiVersionEndpoint + "?" + getpdtmParams(isSDK))
if err != nil {
return err
Expand Down

0 comments on commit ac0107c

Please sign in to comment.