Should make BSDs more reliable. (they seem to reuse ports
quicker than Linux)
Tested by hand with local modifications to force reuse on
Linux. (net/http tests failed before, pass now) Details in the
issue.
Fixes #4436
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
6847101
func (s *Server) Close() {
s.Listener.Close()
s.wg.Wait()
+ s.CloseClientConnections()
+ if t, ok := http.DefaultTransport.(*http.Transport); ok {
+ t.CloseIdleConnections()
+ }
}
// CloseClientConnections closes any currently open HTTP connections