mirror of
https://gitee.com/gitea/gitea.git
synced 2024-12-02 11:47:49 +08:00
Fix FCGI (over TCP) support (#1368)
This commit is contained in:
parent
fe94032f74
commit
ae9b02b079
@ -701,7 +701,12 @@ func runWeb(ctx *cli.Context) error {
|
||||
case setting.HTTPS:
|
||||
err = runHTTPS(listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
|
||||
case setting.FCGI:
|
||||
err = fcgi.Serve(nil, context2.ClearHandler(m))
|
||||
listener, err := net.Listen("tcp", listenAddr)
|
||||
if err != nil {
|
||||
log.Fatal(4, "Failed to bind %s", listenAddr, err)
|
||||
}
|
||||
defer listener.Close()
|
||||
err = fcgi.Serve(listener, context2.ClearHandler(m))
|
||||
case setting.UnixSocket:
|
||||
if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
|
||||
log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)
|
||||
|
Loading…
Reference in New Issue
Block a user