Disable http keepalive to fix accept4: too many open files (#100)
authorpj42 <paulfourball@gmail.com>
Wed, 11 Jan 2017 10:14:30 +0000 (10:14 +0000)
committerBrian Brazil <brian-brazil@users.noreply.github.com>
Wed, 11 Jan 2017 10:14:30 +0000 (10:14 +0000)
http.go

diff --git a/http.go b/http.go
index 65e8d3c18fcb5fb1973b415378de31fb8a7d5149..63aa2667ff3079263c844f1a38f39a246886baf7 100644 (file)
--- a/http.go
+++ b/http.go
@@ -126,6 +126,7 @@ func probeHTTP(target string, w http.ResponseWriter, module Module) (success boo
                TLSClientConfig: tlsconfig,
                Dial:            dial,
                Proxy:           http.ProxyFromEnvironment,
+               DisableKeepAlives: true,
        }
 
        client.CheckRedirect = func(_ *http.Request, via []*http.Request) error {