diff --git a/api/server.go b/api/server.go index b6beb454031e3efad3d57929b8cbf3de3f2640cd..7868600314ff43044a3db6414369e15624cf9b15 100644 --- a/api/server.go +++ b/api/server.go @@ -1079,6 +1079,11 @@ func ServeFd(addr string, handle http.Handler) error { chErrors := make(chan error, len(ls)) + // We don't want to start serving on these sockets until the + // "initserver" job has completed. Otherwise required handlers + // won't be ready. + <-activationLock + // Since ListenFD will return one or more sockets we have // to create a go func to spawn off multiple serves for i := range ls {