瀏覽代碼

Merge pull request #4398 from philips/fix-socket-activation

fix(api): serve until the "acceptconnections" job
Victor Vieux 11 年之前
父節點
當前提交
690fb50beb
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      api/server.go

+ 5 - 0
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 {