diff --git a/README.md b/README.md index 09099e13..681db223 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ $ go run main.go Go 1.9 just released. -Dcumentation and examples will be updated soon to use the already-type aliases inside the framework, such as `iris.Context` instead of the origin pacage. +Dcumentation and examples will be updated soon to use the already-type aliases inside the framework, such as `iris.Context` instead of the origin package. If you've installed [Go 1.9](https://golang.org/dl) then you can omit the `github.com/kataras/iris/context` package from the imports statement. diff --git a/core/host/supervisor.go b/core/host/supervisor.go index bad6599f..ff526cb5 100644 --- a/core/host/supervisor.go +++ b/core/host/supervisor.go @@ -281,7 +281,7 @@ func (su *Supervisor) ListenAndServeTLS(certFile string, keyFile string) error { // If empty, certs will only be cached for the lifetime of the auto tls manager. // // Note: If domain is not empty and the server's port was "443" then -// it will start a new server, automaticall for you, which will redirect all +// it will start a new server, automatically for you, which will redirect all // http versions to their https as well. func (su *Supervisor) ListenAndServeAutoTLS(domain string, email string, cacheDir string) error { var ( @@ -335,7 +335,6 @@ func (su *Supervisor) ListenAndServeAutoTLS(domain string, email string, cacheDi redirectSrv := NewRedirection(":80", target, -1) // register a shutdown callback to this // supervisor in order to close the "secondary redirect server" as well. - su.RegisterOnShutdown(func() { // give it some time to close itself... timeout := 5 * time.Second @@ -343,6 +342,7 @@ func (su *Supervisor) ListenAndServeAutoTLS(domain string, email string, cacheDi defer cancel() redirectSrv.Shutdown(ctx) }) + // start that redirect server using a different goroutine. go redirectSrv.ListenAndServe() } diff --git a/iris.go b/iris.go index d9870401..ea53e86e 100644 --- a/iris.go +++ b/iris.go @@ -566,7 +566,7 @@ func TLS(addr string, certFile, keyFile string, hostConfigs ...host.Configurator // For an "e-mail" use a non-public one, letsencrypt needs that for your own security. // // Note: If domain is not empty and the server's port was "443" then -// it will start a new server, automaticall for you, which will redirect all +// it will start a new server, automatically for you, which will redirect all // http versions to their https as well. // // Last argument is optional, it accepts one or more