Merge pull request #323 from projectdiscovery/fdmax-small-improvement

fdmax => autofdmax + silent fail
master
bauthard 2020-09-21 11:32:26 +05:30 committed by GitHub
commit 8e570bd937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -3,18 +3,13 @@ package main
import (
"context"
"github.com/projectdiscovery/fdmax"
// Attempts to increase the OS file descriptors - Fail silently
_ "github.com/projectdiscovery/fdmax/autofdmax"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/subfinder/pkg/runner"
)
func main() {
// Increase the OS file descriptors
err := fdmax.Set(fdmax.UnixMax)
if err != nil {
gologger.Fatalf("Could not set the max file descriptors for the current process: %s\n", err)
}
// Parse the command line flags and read config files
options := runner.ParseOptions()