[proxy] Don't try to attach if container failed to start

This commit is contained in:
Paul Bellamy committed 2015-07-30 13:31:47 +01:00
1 parent 5e9bd5424a
commit e2389a4061
1 file changed
+4
+4
View File
@@ -16,6 +16,10 @@ func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error {
}
func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error {
if r.StatusCode < 200 || r.StatusCode >= 300 { // Docker didn't do the start
return nil
}
container, err := inspectContainerInPath(i.proxy.client, r.Request.URL.Path)
if err != nil {
return err