MCPcopy
hub / github.com/gofiber/fiber / Shutdown

Method Shutdown

app.go:1274–1276  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

1272//
1273// Shutdown does not close keepalive connections so its recommended to set ReadTimeout to something else than 0.
1274func (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.

Callers 15

Test_App_ShutdownFunction · 0.95
gracefulShutdownMethod · 0.95
Test_ListenFunction · 0.80
Test_Listen_TLSFunction · 0.80
Test_Listen_MutualTLSFunction · 0.80
Test_ListenerFunction · 0.80
Test_Listen_TLSConfigFunction · 0.80
Test_Listen_TLSCertFilesFunction · 0.80

Calls 1

ShutdownWithContextMethod · 0.95

Tested by 15

Test_App_ShutdownFunction · 0.76
Test_ListenFunction · 0.64
Test_Listen_TLSFunction · 0.64
Test_Listen_MutualTLSFunction · 0.64
Test_ListenerFunction · 0.64
Test_Listen_TLSConfigFunction · 0.64
Test_Listen_TLSCertFilesFunction · 0.64