forked from TrueCloudLab/lego
Merge pull request #108 from xi2/http01-disable-keepalives
http-01 challenge: disable TCP connection reuse
This commit is contained in:
commit
614f5ea7ce
1 changed files with 7 additions and 1 deletions
|
@ -58,6 +58,12 @@ func (s *httpChallengeServer) serve(domain, token, keyAuth string) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
http.Serve(s.listener, mux)
|
httpServer := &http.Server{
|
||||||
|
Handler: mux,
|
||||||
|
}
|
||||||
|
// Once httpServer is shut down we don't want any lingering
|
||||||
|
// connections, so disable KeepAlives.
|
||||||
|
httpServer.SetKeepAlivesEnabled(false)
|
||||||
|
httpServer.Serve(s.listener)
|
||||||
s.done <- true
|
s.done <- true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue