1 Star 0 Fork 58

gnaygnil/docker

forked from src-openEuler/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0030-restart-fix-docker-stats-blocked-while-docker.patch 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
gnaygnil 提交于 2020-02-13 15:36 . docker: Fixed build error and URL
From 1e9ad6a48e283bcc9850fb1439bf0be6be805010 Mon Sep 17 00:00:00 2001
From: jingrui <jingrui@huawei.com>
Date: Wed, 9 Jan 2019 00:49:35 +0800
Subject: [PATCH 030/111] restart: fix docker stats blocked while
docker daemon restart
reason: cherry-pick commits to docker-18.09
change closeChan channel from non-buffered channel to 2-buffered channel,
because non-blocked channel will be blocked while docker daemon restart
Change-Id: Ica5dbefc85e463836b55e5d96da522a64a259f64
Signed-off-by: jiangpengfei9 <jiangpengfei9@huawei.com>
Signed-off-by: xiadanni <xiadanni@huawei.com>
---
components/cli/cli/command/container/stats.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/cli/cli/command/container/stats.go b/components/cli/cli/command/container/stats.go
index 4efcb19e65..1f9e1b8556 100644
--- a/components/cli/cli/command/container/stats.go
+++ b/components/cli/cli/command/container/stats.go
@@ -53,7 +53,7 @@ func NewStatsCommand(dockerCli command.Cli) *cobra.Command {
// nolint: gocyclo
func runStats(dockerCli command.Cli, opts *statsOptions) error {
showAll := len(opts.containers) == 0
- closeChan := make(chan error)
+ closeChan := make(chan error, 2)
ctx := context.Background()
--
2.17.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gnaygnil/docker.git
git@gitee.com:gnaygnil/docker.git
gnaygnil
docker
docker
master

搜索帮助