From 986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 12 Apr 2021 12:23:11 -0400 Subject: vendor in containers/storage v1.29.0 Signed-off-by: Daniel J Walsh --- vendor/github.com/Microsoft/hcsshim/hnsendpoint.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vendor/github.com/Microsoft/hcsshim/hnsendpoint.go') diff --git a/vendor/github.com/Microsoft/hcsshim/hnsendpoint.go b/vendor/github.com/Microsoft/hcsshim/hnsendpoint.go index 09b3860a7..408312672 100644 --- a/vendor/github.com/Microsoft/hcsshim/hnsendpoint.go +++ b/vendor/github.com/Microsoft/hcsshim/hnsendpoint.go @@ -40,6 +40,9 @@ func HNSListEndpointRequest() ([]HNSEndpoint, error) { // HotAttachEndpoint makes a HCS Call to attach the endpoint to the container func HotAttachEndpoint(containerID string, endpointID string) error { endpoint, err := GetHNSEndpointByID(endpointID) + if err != nil { + return err + } isAttached, err := endpoint.IsAttached(containerID) if isAttached { return err @@ -50,6 +53,9 @@ func HotAttachEndpoint(containerID string, endpointID string) error { // HotDetachEndpoint makes a HCS Call to detach the endpoint from the container func HotDetachEndpoint(containerID string, endpointID string) error { endpoint, err := GetHNSEndpointByID(endpointID) + if err != nil { + return err + } isAttached, err := endpoint.IsAttached(containerID) if !isAttached { return err -- cgit v1.2.3-54-g00ecf