summaryrefslogtreecommitdiff
path: root/libpod/adapter/client.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-05 19:33:06 +0100
committerGitHub <noreply@github.com>2019-02-05 19:33:06 +0100
commit650e242aa90fcb3f161da6e97921c606d3083215 (patch)
tree19a7bae6cd3bc117fa7b2e9dfe44d3534b4f75ed /libpod/adapter/client.go
parent3554bfce98bc643bd4724340bf2abbaa6373e70c (diff)
parent64c8fb7c2460eb561c8496f781f26d65443eea59 (diff)
downloadpodman-650e242aa90fcb3f161da6e97921c606d3083215.tar.gz
podman-650e242aa90fcb3f161da6e97921c606d3083215.tar.bz2
podman-650e242aa90fcb3f161da6e97921c606d3083215.zip
Merge pull request #2227 from baude/remoteexport
podman-remote import|export
Diffstat (limited to 'libpod/adapter/client.go')
-rw-r--r--libpod/adapter/client.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/adapter/client.go b/libpod/adapter/client.go
index b3bb9acae..6512a5952 100644
--- a/libpod/adapter/client.go
+++ b/libpod/adapter/client.go
@@ -34,3 +34,14 @@ func (r RemoteRuntime) Connect() (*varlink.Connection, error) {
}
return connection, nil
}
+
+// RefreshConnection is used to replace the current r.Conn after things like
+// using an upgraded varlink connection
+func (r RemoteRuntime) RefreshConnection() error {
+ newConn, err := r.Connect()
+ if err != nil {
+ return err
+ }
+ r.Conn = newConn
+ return nil
+}