deadsfu
deadsfu copied to clipboard
Replace http.ListenAndServe to enable ReadTimeout and WriteTimeout
Instead, create a http.Server instance with ReadTimeout and WriteTimeout and use its corresponding methods, like in the example a few paragraphs above.
https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/