xiaoxiang781216 commented on code in PR #21536:
URL: https://github.com/apache/nuttx/pull/21536#discussion_r4506202552


##########
net/bluetooth/bluetooth_sockif.c:
##########
@@ -640,8 +771,29 @@ static int bluetooth_close(FAR struct socket *psock)
             {
               /* Yes... free the connection structure */
 
-              conn->bc_crefs = 0;                  /* No more references on 
the connection */
-              bluetooth_conn_free(psock->s_conn);  /* Free network resources */
+#ifndef CONFIG_WIRELESS_BLUETOOTH_HOST
+              if (conn->bc_proto == BTPROTO_HCI)
+                {
+                  FAR struct radio_driver_s *radio;
+
+                  net_lock();
+                  radio = bluetooth_hci_find_device(conn->bc_ldev);
+
+                  if (radio != NULL && !bluetooth_hci_has_other(conn))

Review Comment:
   carrier state should reflect whether booth is connected to peer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to