Permalink
Browse files

Fix timeout when exec/attach

  • Loading branch information...
resouer committed Sep 22, 2016
1 parent 83ca08b commit 5d778f340a5558d3dbe8d24a8e0ce83b778fc620
Showing with 4 additions and 2 deletions.
  1. +2 −0 examples/hypernetes-demo.sh
  2. +2 −2 pkg/kubelet/hyper/hyperclient.go
@@ -68,6 +68,8 @@ spec:
containers:
- name: busybox
image: busybox
+ command:
+ - "top"
EOF
}
@@ -413,7 +413,7 @@ func (c *HyperClient) Attach(opts AttachToContainerOptions) error {
return fmt.Errorf("No Such Container %s", opts.Container)
}
- ctx, cancel := getContextWithTimeout(hyperContextTimeout)
+ ctx, cancel := getContextWithCancel()
defer cancel()
stream, err := c.client.Attach(ctx)
@@ -499,7 +499,7 @@ func (c *HyperClient) Exec(opts ExecInContainerOptions) error {
Tty: opts.TTY,
}
- ctx, cancel := getContextWithTimeout(hyperContextTimeout)
+ ctx, cancel := getContextWithCancel()
defer cancel()
createResponse, err := c.client.ExecCreate(ctx, &createRequest)

0 comments on commit 5d778f3

Please sign in to comment.