Fix reconnecting, through a proxy, to a closed connection