mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Merge pull request #2894 from weaveworks/2017-10-16-close-pipe-error-path
docker: Close pipe when the docker API call fails
This commit is contained in:
@@ -86,6 +86,7 @@ func (r *registry) attachContainer(containerID string, req xfer.Request) xfer.Re
|
||||
ErrorStream: local,
|
||||
})
|
||||
if err != nil {
|
||||
pipe.Close()
|
||||
return xfer.ResponseError(err)
|
||||
}
|
||||
pipe.OnClose(func() {
|
||||
@@ -133,6 +134,7 @@ func (r *registry) execContainer(containerID string, req xfer.Request) xfer.Resp
|
||||
ErrorStream: local,
|
||||
})
|
||||
if err != nil {
|
||||
pipe.Close()
|
||||
return xfer.ResponseError(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user