mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
httplib: add Close() method to shut the server down and use it in tests
This commit is contained in:
@@ -14,3 +14,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