summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorMorgan Bazalgette <git@howl.moe>2018-01-12 23:16:49 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2018-01-12 23:16:49 +0100
commit2b52f77e1b288a1d6dec95339ef58241d0de21ed (patch)
treef2af25fbc86068f20322d3c420ab26c70de9e9ef /cmd/web.go
parent079273e2ffceb615213409adcce6b9366de6ee41 (diff)
downloadgitea-2b52f77e1b288a1d6dec95339ef58241d0de21ed.tar.gz
gitea-2b52f77e1b288a1d6dec95339ef58241d0de21ed.zip
General refactor of the cmd package (#3328)
* General refactor of the cmd package * Address breakage in runCreateUser * Place "common" functions into cmd.go
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 473688a8b8..bc3cee69e5 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -121,11 +121,9 @@ func runWeb(ctx *cli.Context) error {
}
}
- var listenAddr string
- if setting.Protocol == setting.UnixSocket {
- listenAddr = fmt.Sprintf("%s", setting.HTTPAddr)
- } else {
- listenAddr = fmt.Sprintf("%s:%s", setting.HTTPAddr, setting.HTTPPort)
+ listenAddr := setting.HTTPAddr
+ if setting.Protocol != setting.UnixSocket {
+ listenAddr += ":" + setting.HTTPPort
}
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubURL)
@@ -135,6 +133,7 @@ func runWeb(ctx *cli.Context) error {
if setting.EnablePprof {
go func() {
+ log.Info("Starting pprof server on localhost:6060")
log.Info("%v", http.ListenAndServe("localhost:6060", nil))
}()
}