Browse Source

Return an empty services list if no services are running

Signed-off-by: Ralf Sippl <ralf.sippl@gmail.com>
(cherry picked from commit c8e4e95db9b0d3115435b8f0e94c78a2e0cb92d0)
Signed-off-by: Tibor Vass <tibor@docker.com>
Ralf Sippl 9 năm trước cách đây
mục cha
commit
18f1fc8349
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      daemon/cluster/cluster.go

+ 1 - 1
daemon/cluster/cluster.go

@@ -654,7 +654,7 @@ func (c *Cluster) GetServices(options apitypes.ServiceListOptions) ([]types.Serv
 		return nil, err
 	}
 
-	var services []types.Service
+	services := []types.Service{}
 
 	for _, service := range r.Services {
 		services = append(services, convert.ServiceFromGRPC(*service))