device: Set disconnect timer to zero for fast disconnection 20/309820/1
authorSohyeon Choi <shss.choi@samsung.com>
Sun, 7 Apr 2024 14:11:32 +0000 (23:11 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 17 Apr 2024 05:01:16 +0000 (14:01 +0900)
Change-Id: I8d6d3741b05abb9c2f5a18a34eb197f9a924d149

src/device.c

index e2fc7b9..f780165 100644 (file)
@@ -2434,9 +2434,16 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg)
                return;
        }
 
-       device->disconn_timer = timeout_add_seconds(DISCONNECT_TIMER,
-                                                       disconnect_all,
-                                                       device, NULL);
+       if (TIZEN_FEATURE_BLUEZ_DA) {
+               DBG("set disconnect timer to zero for fast disconnection");
+               device->disconn_timer = timeout_add_seconds(0,
+                                                               disconnect_all,
+                                                               device, NULL);
+       } else {
+               device->disconn_timer = timeout_add_seconds(DISCONNECT_TIMER,
+                                                               disconnect_all,
+                                                               device, NULL);
+       }
 }
 
 bool device_is_disconnecting(struct btd_device *device)