Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7fe3ea6 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Close connection before retrying" into lmp-dev am: a8648ece am:...

Merge "Close connection before retrying" into lmp-dev am: a8648ece am: 5181a7ab am: 4b78a795 am: 6d5bc9a3 am: 3272cf26 am: e18e8c41 am: 69b6a382 am: ce5c72e8
am: 4d9e6150

Change-Id: I5ede1388f265920fa5dd835c4a6335380daa9103
parents 3946a75c 4d9e6150
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -135,7 +135,13 @@ public class MediaHTTPConnection extends IMediaHTTPConnection.Stub {

    private void teardownConnection() {
        if (mConnection != 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;