aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web_graceful.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-11-24 02:11:24 +0000
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-11-24 03:11:24 +0100
commite3f22ad2cca094cba057683f35f8536e3f71a582 (patch)
tree9585b6493b3a4bff13d113c9e2d7ed8f26f2c16a /cmd/web_graceful.go
parentbb2c0c3729b4bb4b1475b176dfe8e1d43f49481f (diff)
downloadgitea-e3f22ad2cca094cba057683f35f8536e3f71a582.tar.gz
gitea-e3f22ad2cca094cba057683f35f8536e3f71a582.zip
Graceful: Allow graceful restart for unix sockets (#9113)
Previously we could not handle graceful restarts for http over unix sockets. These can now be handled.
Diffstat (limited to 'cmd/web_graceful.go')
-rw-r--r--cmd/web_graceful.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/web_graceful.go b/cmd/web_graceful.go
index a37f669d09..3907e843a2 100644
--- a/cmd/web_graceful.go
+++ b/cmd/web_graceful.go
@@ -11,16 +11,16 @@ import (
"code.gitea.io/gitea/modules/graceful"
)
-func runHTTP(listenAddr string, m http.Handler) error {
- return graceful.HTTPListenAndServe("tcp", listenAddr, m)
+func runHTTP(network, listenAddr string, m http.Handler) error {
+ return graceful.HTTPListenAndServe(network, listenAddr, m)
}
-func runHTTPS(listenAddr, certFile, keyFile string, m http.Handler) error {
- return graceful.HTTPListenAndServeTLS("tcp", listenAddr, certFile, keyFile, m)
+func runHTTPS(network, listenAddr, certFile, keyFile string, m http.Handler) error {
+ return graceful.HTTPListenAndServeTLS(network, listenAddr, certFile, keyFile, m)
}
-func runHTTPSWithTLSConfig(listenAddr string, tlsConfig *tls.Config, m http.Handler) error {
- return graceful.HTTPListenAndServeTLSConfig("tcp", listenAddr, tlsConfig, m)
+func runHTTPSWithTLSConfig(network, listenAddr string, tlsConfig *tls.Config, m http.Handler) error {
+ return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, tlsConfig, m)
}
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector