diff --git a/recipes/graceful-shutdown/grace/server.go b/recipes/graceful-shutdown/grace/server.go index 9dbeb7d4..da3dc0b7 100644 --- a/recipes/graceful-shutdown/grace/server.go +++ b/recipes/graceful-shutdown/grace/server.go @@ -14,5 +14,14 @@ func main() { return c.String(http.StatusOK, "Six sick bricks tick") }) - gracehttp.Serve(e.Server(":1323")) + // Get the http.Server + s := e.Server(":1323") + + // HTTP2 is currently enabled by default in echo.New(). To override TLS handshake errors + // you will need to override the TLSConfig for the server so it does not attempt to valudate + // the connection using TLS as required by HTTP2 + s.TLSConfig = nil + + // Serve it like a boss + gracehttp.Serve(s) }