summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-28 16:03:16 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-28 16:03:16 -0800
commit8e5aca003ca90e65b9812a4a826a5f8b768b59bb (patch)
tree762b22870a05138d4be0a281ff6b87969c07381d
parent44a55ad6a05bc720e44f3dd762ca1d9cf3f5579a (diff)
moving call point of goroutine to be more visible to user
-rw-r--r--cmd/ponzu/main.go4
-rw-r--r--system/tls/enable.go2
-rw-r--r--system/tls/enabledev.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go
index 09edcc0..9ffb433 100644
--- a/cmd/ponzu/main.go
+++ b/cmd/ponzu/main.go
@@ -174,10 +174,10 @@ func main() {
// cannot run production HTTPS and development HTTPS together
if devhttps {
fmt.Println("Enabling self-signed HTTPS... [DEV]")
- tls.EnableDev()
+ go tls.EnableDev()
} else if https {
fmt.Println("Enabling HTTPS...")
- tls.Enable()
+ go tls.Enable()
}
// save the port the system is listening on so internal system can make
diff --git a/system/tls/enable.go b/system/tls/enable.go
index 77ff287..7017201 100644
--- a/system/tls/enable.go
+++ b/system/tls/enable.go
@@ -75,6 +75,6 @@ func Enable() {
TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
}
- go log.Fatalln(server.ListenAndServeTLS("", ""))
+ log.Fatalln(server.ListenAndServeTLS("", ""))
fmt.Println("Server listening on :443 for HTTPS requests...")
}
diff --git a/system/tls/enabledev.go b/system/tls/enabledev.go
index 35c8e45..394666b 100644
--- a/system/tls/enabledev.go
+++ b/system/tls/enabledev.go
@@ -26,7 +26,7 @@ func EnableDev() {
cert := filepath.Join(vendorPath, "devcerts", "cert.pem")
key := filepath.Join(vendorPath, "devcerts", "key.pem")
- go log.Fatalln(http.ListenAndServeTLS(":10443", cert, key, nil))
+ log.Fatalln(http.ListenAndServeTLS(":10443", cert, key, nil))
fmt.Println("Server listening on https://localhost:10443 for requests... [DEV]")
fmt.Println("----")
fmt.Println("If your browser rejects HTTPS requests, try allowing insecure connections on localhost.")