Merge "Close connection before retrying" into lmp-dev am: a8648ecebb am: 5181a7ab64 am: 4b78a79546
am: 6d5bc9a3c2
Change-Id: I8165c2218d0d5de41468f8acff86a720c03d1f52
This commit is contained in:
@@ -135,7 +135,13 @@ public class MediaHTTPConnection extends IMediaHTTPConnection.Stub {
|
||||
|
||||
private void teardownConnection() {
|
||||
if (mConnection != null) {
|
||||
mInputStream = null;
|
||||
if (mInputStream != null) {
|
||||
try {
|
||||
mInputStream.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
mInputStream = null;
|
||||
}
|
||||
|
||||
mConnection.disconnect();
|
||||
mConnection = null;
|
||||
@@ -297,8 +303,7 @@ public class MediaHTTPConnection extends IMediaHTTPConnection.Stub {
|
||||
mCurrentOffset = offset;
|
||||
} catch (IOException e) {
|
||||
mTotalSize = -1;
|
||||
mInputStream = null;
|
||||
mConnection = null;
|
||||
teardownConnection();
|
||||
mCurrentOffset = -1;
|
||||
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user