TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
182 stars 49 forks source link

DOCKER-787 catch error when connecting for attach/exec #77

Closed joshwilsdon closed 8 years ago

joshwilsdon commented 8 years ago

When a connection to the agent fails with ECONNREFUSED, the restify domain's handler catches the error and we end up not calling /wait from the client. This means that:

docker run --rm node

sometimes works and sometimes bails because the container is still running (when we haven't run wait to see it stop). This fix makes it so that when a connection is refused we get the normal 400 response instead and the client calls wait.

misterdjules commented 8 years ago

@joshwilsdon LGTM :)