1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

new Timeout, TimeoutMessage configuration fields and apps.OnApplicationRegistered listener

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-12-09 14:44:03 +02:00
parent 968a9ec06c
commit d6cfe3fe5b
9 changed files with 124 additions and 7 deletions

View File

@@ -640,6 +640,11 @@ func (app *Application) Build() error {
return err
}
app.HTTPErrorHandler = routerHandler
if app.config.Timeout > 0 {
app.Router.SetTimeoutHandler(app.config.Timeout, app.config.TimeoutMessage)
}
// re-build of the router from outside can be done with
// app.RefreshRouter()
}