From 57bc65cbf73138bf9a1578c4d965822355dde599 Mon Sep 17 00:00:00 2001 From: Lifubang Date: Tue, 9 Oct 2018 09:33:58 +0800 Subject: [PATCH] code optimization Signed-off-by: Lifubang --- cli/command/container/tty.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/command/container/tty.go b/cli/command/container/tty.go index 50b64857158e..94bd7a49bfb1 100644 --- a/cli/command/container/tty.go +++ b/cli/command/container/tty.go @@ -70,8 +70,7 @@ func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool } go func() { - timeout := 1 * time.Millisecond - <-time.After(timeout) + time.Sleep(time.Millisecond) resizeTty() }() return nil