Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waiting indefinitely for all connections to return to idle before shutting down. Make sure the program doesn't exit and waits instead for Shutdown to re
()
| 1272 | // |
| 1273 | // Shutdown does not close keepalive connections so its recommended to set ReadTimeout to something else than 0. |
| 1274 | func (app *App) Shutdown() error { |
| 1275 | return app.ShutdownWithContext(context.Background()) |
| 1276 | } |
| 1277 | |
| 1278 | // ShutdownWithTimeout gracefully shuts down the server without interrupting any active connections. However, if the timeout is exceeded, |
| 1279 | // ShutdownWithTimeout will forcefully close any active connections. |