okhttp: Remove wrong status description

The != should have been ==. However, it is provable that the exception
won't be null, but we want to make that fact obvious when auditing. So
we just fail if the exception is ever null.
This commit is contained in:
Eric Anderson 2016-08-01 09:44:58 -07:00
parent fb8402fcb1
commit 5b7a21ab03
1 changed files with 1 additions and 3 deletions

View File

@ -548,10 +548,8 @@ class OkHttpClientTransport implements ConnectionClientTransport {
* Finish all active streams due to an IOException, then close the transport.
*/
void onException(Throwable failureCause) {
Preconditions.checkNotNull(failureCause, "failureCause");
Status status = Status.UNAVAILABLE.withCause(failureCause);
if (failureCause != null) {
status = status.augmentDescription("No provided cause");
}
startGoAway(0, ErrorCode.INTERNAL_ERROR, status);
}