Commit 91a09ea3 by Emanuele Tidó Committed by GitHub

Update OkHttpDataSource.java

set responseBody to Util.EMPTY_BYTE_ARRAY when an IOException occurs trying to get his value from inputStream
parent 65489084
......@@ -309,8 +309,7 @@ public class OkHttpDataSource extends BaseDataSource implements HttpDataSource {
try {
errorResponseBody = Util.toByteArray(Assertions.checkNotNull(responseByteStream));
} catch (IOException e) {
throw new InvalidResponseCodeException(
responseCode, response.message(), headers, dataSpec, null);
errorResponseBody = Util.EMPTY_BYTE_ARRAY;
}
closeConnectionQuietly();
InvalidResponseCodeException exception =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment