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

Commit 3fa1a6ed authored by Sungsoo Lim's avatar Sungsoo Lim
Browse files

Ensure BluetoothSocket closed even when exception happens

Bug: 266351648
Test: atest PbapClientConnectionHandlerTest
Change-Id: I5bf6be508be9ceeef55c835c14b7ae11ef579f3d
parent b1f046b8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -229,13 +229,13 @@ class PbapClientConnectionHandler extends Handler {
                        mObexSession.disconnect(null);
                        mObexSession.close();
                    }

                } catch (IOException e) {
                    Log.w(TAG, "DISCONNECT Failure ", e);
                } finally {
                    if (DBG) {
                        Log.d(TAG, "Closing Socket");
                    }
                    closeSocket();
                } catch (IOException e) {
                    Log.w(TAG, "DISCONNECT Failure ", e);
                }
                if (DBG) {
                    Log.d(TAG, "Completing Disconnect");