mirror of https://github.com/grpc/grpc-java.git
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:
parent
fb8402fcb1
commit
5b7a21ab03
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue