summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/server.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index cc5b45a65..24ad1874b 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -190,6 +190,9 @@ func (s *APIServer) Serve() error {
}); err != nil {
return err
}
+ // Unregister the libpod handler, which just calls exit(1).
+ // Ignore errors if it doesn't exist.
+ _ = shutdown.Unregister("libpod")
errChan := make(chan error, 1)
@@ -226,12 +229,7 @@ func (s *APIServer) Serve() error {
errChan <- nil
}()
- select {
- case err := <-errChan:
- return err
- }
-
- return nil
+ return <-errChan
}
// Shutdown is a clean shutdown waiting on existing clients