Proxy: handle closed/failed connections

Signed-off-by: Eduardo Silva <eduardo@monkey.io>