From 85d3201c96acc344171c9e93770b678412efca7a Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Wed, 5 Feb 2020 08:57:41 -0800 Subject: [PATCH] Reset fixed channel after callback called Bug: 139137147 Test: Verify no ASSERT when remote closes channel Change-Id: Iecd2f267c89a85444ce08d332f933a292085ce7f --- gd/security/pairing/classic_pairing_handler.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gd/security/pairing/classic_pairing_handler.cc b/gd/security/pairing/classic_pairing_handler.cc index 235263b9c..bb16f0a9e 100644 --- a/gd/security/pairing/classic_pairing_handler.cc +++ b/gd/security/pairing/classic_pairing_handler.cc @@ -99,6 +99,7 @@ void ClassicPairingHandler::OnConnectionClose(hci::ErrorCode error_code) { // Called when the connection gets closed LOG_ERROR("Connection closed due to: %s", hci::ErrorCodeText(error_code).c_str()); ASSERT(fixed_channel_ != nullptr); + fixed_channel_.reset(); Cancel(); } -- 2.11.0