diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-31 04:53:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-31 04:53:29 +0200 |
commit | 558ce8d1417d3980e4622b3293a2e16ee1e267cb (patch) | |
tree | 946c3e52196f598acc111db1875896733e15838d /pkg/adapter/containers_remote.go | |
parent | 88b7a221a2303f1b1b6664a07b3aafd7d037307b (diff) | |
parent | 90ae7206f3ac989c6bc435c03badadcd25976eef (diff) | |
download | podman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.tar.gz podman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.tar.bz2 podman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.zip |
Merge pull request #3224 from haraldh/varlink_upgrade
Fix for varlink upgrade connections
Diffstat (limited to 'pkg/adapter/containers_remote.go')
-rw-r--r-- | pkg/adapter/containers_remote.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go index c34495b3d..0c0bce813 100644 --- a/pkg/adapter/containers_remote.go +++ b/pkg/adapter/containers_remote.go @@ -583,7 +583,15 @@ func (r *LocalRuntime) attach(ctx context.Context, stdin, stdout *os.File, cid s } // TODO add detach keys support - _, err = iopodman.Attach().Send(r.Conn, varlink.Upgrade, cid, detachKeys, start) + reply, err := iopodman.Attach().Send(r.Conn, varlink.Upgrade, cid, detachKeys, start) + if err != nil { + restoreTerminal(oldTermState) + return nil, err + } + + // See if the server accepts the upgraded connection or returns an error + _, err = reply() + if err != nil { restoreTerminal(oldTermState) return nil, err |