mirror of
https://github.com/containers/podman.git
synced 2025-10-17 11:14:40 +08:00
pkg/api: remove deadcode
One might think Close() should be called but we are already using Shutdown() which is the graceful way to stop the server so we don't actually need Close(). Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -50,14 +50,6 @@ const (
|
||||
// shutdownOnce ensures Shutdown() may safely be called from several go routines
|
||||
var shutdownOnce sync.Once
|
||||
|
||||
// NewServer will create and configure a new API server with all defaults
|
||||
func NewServer(runtime *libpod.Runtime) (*APIServer, error) {
|
||||
return newServer(runtime, nil, entities.ServiceOptions{
|
||||
CorsHeaders: DefaultCorsHeaders,
|
||||
Timeout: DefaultServiceDuration,
|
||||
})
|
||||
}
|
||||
|
||||
// NewServerWithSettings will create and configure a new API server using provided settings
|
||||
func NewServerWithSettings(runtime *libpod.Runtime, listener net.Listener, opts entities.ServiceOptions) (*APIServer, error) {
|
||||
return newServer(runtime, listener, opts)
|
||||
@ -298,8 +290,3 @@ func (s *APIServer) Shutdown(halt bool) error {
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close immediately stops responding to clients and exits
|
||||
func (s *APIServer) Close() error {
|
||||
return s.Server.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user