1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-19 04:27:53 +00:00

⚙ init only once

This commit is contained in:
Fenny 2020-08-10 23:56:47 +02:00
parent 254bc30596
commit 5108d2b3b3

3
app.go
View File

@ -508,6 +508,9 @@ func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
// Handler returns the server handler.
func (app *App) Handler() fasthttp.RequestHandler {
if !app.initialized {
app.init()
}
return app.handler
}