[proxy] Don't try to attach if container failed to start
This commit is contained in:
1 parent
5e9bd5424a
commit
e2389a4061
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user