MCPcopy
hub / github.com/caddyserver/caddy / Cleanup

Method Cleanup

modules/caddyhttp/app.go:806–811  ·  view source on GitHub ↗

Cleanup will close remaining listeners if they still remain because some of the servers fail to start. It simply calls Stop because Stop won't be called when Start fails.

()

Source from the content-addressed store, hash-verified

804// because some of the servers fail to start.
805// It simply calls Stop because Stop won't be called when Start fails.
806func (app *App) Cleanup() error {
807 if app.stopped {
808 return nil
809 }
810 return app.Stop()
811}
812
813func (app *App) httpPort() int {
814 if app.HTTPPort == 0 {

Callers

nothing calls this directly

Implementers 6

fooModuleadmin_test.go
PKImodules/caddypki/pki.go
TLSmodules/caddytls/tls.go
Filesystemsmodules/caddyfs/filesystem.go
Appmodules/caddyhttp/app.go
Appmodules/caddyevents/app.go

Calls 1

StopMethod · 0.95

Tested by

no test coverage detected