1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-05 23:08:17 +02:00

Test cased for Echo#Start/Shutdown

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-09-24 17:48:40 -07:00
parent 59e812f7b9
commit d069d9b3a9
4 changed files with 64 additions and 4 deletions

View File

@@ -63,6 +63,7 @@ type (
Echo struct {
Server *http.Server
TLSServer *http.Server
TLSConfig *tls.Config
ShutdownTimeout time.Duration
DisableHTTP2 bool
Debug bool
@@ -526,9 +527,9 @@ func (e *Echo) StartTLS(address string, certFile, keyFile string) (err error) {
return errors.New("invalid tls configuration")
}
config := &tls.Config{}
if e.Server.TLSConfig != nil {
if e.TLSConfig != nil {
// TODO: https://github.com/golang/go/commit/d24f446a90ea94b87591bf16228d7d871fec3d92
*config = *e.Server.TLSConfig
*config = *e.TLSConfig
}
if !e.DisableHTTP2 {
config.NextProtos = append(config.NextProtos, "h2")