OSDN Git Service

Reset fixed channel after callback called
authorChris Manton <cmanton@google.com>
Wed, 5 Feb 2020 16:57:41 +0000 (08:57 -0800)
committerChris Manton <cmanton@google.com>
Wed, 5 Feb 2020 17:00:20 +0000 (09:00 -0800)
Bug: 139137147
Test: Verify no ASSERT when remote closes channel

Change-Id: Iecd2f267c89a85444ce08d332f933a292085ce7f

gd/security/pairing/classic_pairing_handler.cc

index 235263b..bb16f0a 100644 (file)
@@ -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();
 }