mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Update OkHttpDataSource.java
set responseBody to Util.EMPTY_BYTE_ARRAY when an IOException occurs trying to get his value from inputStream
This commit is contained in:
parent
654890846a
commit
91a09ea320
1 changed files with 1 additions and 2 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Reference in a new issue