MCPcopy
hub / github.com/moby/moby / stop

Method stop

daemon/command/daemon.go:577–586  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

575}
576
577func (cli *daemonCLI) stop() {
578 // Signal that the API server should shut down as soon as possible.
579 // This construct is used rather than directly shutting down the HTTP
580 // server to avoid any issues if this method is called before the server
581 // has been instantiated in cli.start(). If this method is called first,
582 // the HTTP server will be shut down immediately upon instantiation.
583 cli.stopOnce.Do(func() {
584 close(cli.apiShutdown)
585 })
586}
587
588// shutdownDaemon just wraps daemon.Shutdown() to handle a timeout in case
589// d.Shutdown() is waiting too long to kill container or worst it's

Callers 2

CloseMethod · 0.45
ExecuteMethod · 0.45

Calls 1

DoMethod · 0.45

Tested by

no test coverage detected