Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: alloc exec recovers from bad client connection
If alloc exec fails to connect to the nomad client associated with the alloc, fail over to using a server. The code attempted to special case `net.Error` for failover to rule out other permanent non-networking errors, by reusing a pattern in the logging handling. But this pattern does not apply here. `net/http.Http` wraps all errors as `*url.Error` that is net.Error. The websocket doesn't, and instead returns the raw error. If the raw error isn't a `net.Error`, like in the case of TLS handshake errors, the api package would fail immediately rather than failover.
- Loading branch information