mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-20 22:33:09 +00:00
⚙ init only once
This commit is contained in:
parent
254bc30596
commit
5108d2b3b3
3
app.go
3
app.go
@ -508,6 +508,9 @@ func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {
|
|||||||
|
|
||||||
// Handler returns the server handler.
|
// Handler returns the server handler.
|
||||||
func (app *App) Handler() fasthttp.RequestHandler {
|
func (app *App) Handler() fasthttp.RequestHandler {
|
||||||
|
if !app.initialized {
|
||||||
|
app.init()
|
||||||
|
}
|
||||||
return app.handler
|
return app.handler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user