overdue
This commit is contained in:
21
.rclone_repo/cmd/serve/httplib/http_new.go
Executable file
21
.rclone_repo/cmd/serve/httplib/http_new.go
Executable file
@@ -0,0 +1,21 @@
|
||||
// HTTP parts go1.8+
|
||||
|
||||
//+build go1.8
|
||||
|
||||
package httplib
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Initialise the http.Server for post go1.8
|
||||
func initServer(s *http.Server) {
|
||||
s.ReadHeaderTimeout = 10 * time.Second // time to send the headers
|
||||
s.IdleTimeout = 60 * time.Second // time to keep idle connections open
|
||||
}
|
||||
|
||||
// closeServer closes the server in a non graceful way
|
||||
func closeServer(s *http.Server) error {
|
||||
return s.Close()
|
||||
}
|
||||
Reference in New Issue
Block a user