Skip to content

Commit

Permalink
disabling keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyagara committed Nov 5, 2024
1 parent a1afdcf commit 642181a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hagelslag.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ func (h Hagelslag) worker(ips <-chan string, wg *sync.WaitGroup) {
port := h.Scanner.Port()
network := h.Scanner.Network()

dialer := net.Dialer{Timeout: 1 * time.Second}
dialer := net.Dialer{
KeepAlive: -1,
Timeout: 1 * time.Second,
}

collection := client.Database("hagelslag").Collection(name)

// Responsible for controlling how many tasks can be processed
// Responsible for controlling how many tasks can be processed by a worker
semaphore := make(chan struct{}, h.TasksPerThread)

for ip := range ips {
Expand Down

0 comments on commit 642181a

Please sign in to comment.