浏览代码

Increase size of buffer for signals

The chan struct used to forward signals to containers was one element only,
which caused some signals to be dropped when many were being received.
Increasing the size of the chan buffer makes this much less likely to happen.

Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
Matthew Heon 11 年之前
父节点
当前提交
06cd125e64
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/client/commands.go

+ 1 - 1
api/client/commands.go

@@ -535,7 +535,7 @@ func (cli *DockerCli) CmdRestart(args ...string) error {
 }
 }
 
 
 func (cli *DockerCli) forwardAllSignals(cid string) chan os.Signal {
 func (cli *DockerCli) forwardAllSignals(cid string) chan os.Signal {
-	sigc := make(chan os.Signal, 1)
+	sigc := make(chan os.Signal, 128)
 	signal.CatchAll(sigc)
 	signal.CatchAll(sigc)
 	go func() {
 	go func() {
 		for s := range sigc {
 		for s := range sigc {