diff options
author | Harald Hoyer <harald@redhat.com> | 2019-05-29 17:04:14 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2019-05-29 17:16:18 +0200 |
commit | 90ae7206f3ac989c6bc435c03badadcd25976eef (patch) | |
tree | 7742a67098d96d101d5cdcee5fea3931e0b35428 /pkg/varlinkapi/attach.go | |
parent | 8649dbdc11bc14feb59794d76ba197771d8a6d51 (diff) | |
download | podman-90ae7206f3ac989c6bc435c03badadcd25976eef.tar.gz podman-90ae7206f3ac989c6bc435c03badadcd25976eef.tar.bz2 podman-90ae7206f3ac989c6bc435c03badadcd25976eef.zip |
Fix the varlink upgraded calls
Although an upgraded call is requested, the server has to send at least
one reply (can be an error) and the client has to check the reply,
before assuming an upgraded connection.
Signed-off-by: Harald Hoyer <harald@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/attach.go')
-rw-r--r-- | pkg/varlinkapi/attach.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/varlinkapi/attach.go b/pkg/varlinkapi/attach.go index 2234899a5..8051f07be 100644 --- a/pkg/varlinkapi/attach.go +++ b/pkg/varlinkapi/attach.go @@ -60,7 +60,10 @@ func (i *LibpodAPI) Attach(call iopodman.VarlinkCall, name string, detachKeys st if !start && state != libpod.ContainerStateRunning { return call.ReplyErrorOccurred("container must be running to attach") } - call.Reply(nil) + + // ACK the client upgrade request + call.ReplyAttach() + reader, writer, _, pw, streams := setupStreams(call) go func() { |