From 00262edf6c89840f8b90db7d8e7e664138478eda Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 21 May 2019 09:10:23 -0500 Subject: make remote resize channel buffered when doing any sort of attach to a container, a sigwinch is sent followed by a resize event. this is fine for the local client but when doing things over the varlink, the first sigwinch is wiped out by the immediate resize event and is therefore lost. by making the channel buffered, both events are processed after the varlink connection is established. Signed-off-by: baude --- pkg/adapter/containers_remote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go index 63b0f9d2f..c34495b3d 100644 --- a/pkg/adapter/containers_remote.go +++ b/pkg/adapter/containers_remote.go @@ -561,7 +561,7 @@ func (r *LocalRuntime) attach(ctx context.Context, stdin, stdout *os.File, cid s if err != nil { return nil, err } - resize := make(chan remotecommand.TerminalSize) + resize := make(chan remotecommand.TerminalSize, 5) haveTerminal := terminal.IsTerminal(int(os.Stdin.Fd())) // Check if we are attached to a terminal. If we are, generate resize -- cgit v1.2.3-54-g00ecf