summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 9344101ce..a906a01f1 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -79,6 +79,10 @@ func newServer(runtime *libpod.Runtime, listener net.Listener, opts entities.Ser
return nil, fmt.Errorf("wrong number of file descriptors for socket activation protocol (%d != 1)", len(listeners))
}
listener = listeners[0]
+ // note that activation.Listeners() return nil when it cannot listen on the fd (i.e. udp connection)
+ if listener == nil {
+ return nil, fmt.Errorf("unexpected fd received from systemd: cannot listen on it")
+ }
}
if opts.CorsHeaders == "" {
logrus.Debug("CORS Headers were not set")