Skip to content

Commit

Permalink
Merge pull request #316 from vzamanillo/fdmax
Browse files Browse the repository at this point in the history
Increase the OS file descriptors to max by using fdmax
  • Loading branch information
ehsandeep committed Sep 20, 2020
2 parents 61e8dd2 + 09aec36 commit dcc62d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/subfinder/main.go
Expand Up @@ -3,11 +3,18 @@ package main
import (
"context"

"github.com/projectdiscovery/fdmax"
"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()

Expand Down
1 change: 1 addition & 0 deletions go.mod
Expand Up @@ -9,6 +9,7 @@ require (
github.com/miekg/dns v1.1.29
github.com/pkg/errors v0.9.1
github.com/projectdiscovery/chaos-client v0.1.6
github.com/projectdiscovery/fdmax v0.0.2
github.com/projectdiscovery/gologger v1.0.0
github.com/rs/xid v1.2.1
github.com/stretchr/testify v1.5.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Expand Up @@ -42,6 +42,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/projectdiscovery/chaos-client v0.1.6 h1:AbIN7xUszjUi7FxI4qUVSqJ3um+6eImE/xstbNS0A1M=
github.com/projectdiscovery/chaos-client v0.1.6/go.mod h1:F5omaoJh/vMvWnZhKD4zFFA5ti+RPwUletwepKSyfxk=
github.com/projectdiscovery/fdmax v0.0.1 h1:EDpan+CgIAAYJ1K1zpTii2SouIDPHQwpGQsYc2UGUj0=
github.com/projectdiscovery/fdmax v0.0.1/go.mod h1:mbR7lJ9EONyxEfcsL2LlGtOSlzCQ5VraLzoJa/VTrAs=
github.com/projectdiscovery/fdmax v0.0.2 h1:d0HqNC4kbrMWT669u9W7ksFS7UBvnW0zmgY6FBU45UY=
github.com/projectdiscovery/fdmax v0.0.2/go.mod h1:mbR7lJ9EONyxEfcsL2LlGtOSlzCQ5VraLzoJa/VTrAs=
github.com/projectdiscovery/gologger v1.0.0 h1:XAQ8kHeVKXMjY4rLGh7eT5+oHU077BNEvs7X6n+vu1s=
github.com/projectdiscovery/gologger v1.0.0/go.mod h1:Ok+axMqK53bWNwDSU1nTNwITLYMXMdZtRc8/y1c7sWE=
github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=
Expand Down

0 comments on commit dcc62d0

Please sign in to comment.