From 0ee2d331d9390ddc47e812601a19f9440a6266ca Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 24 Oct 2016 14:35:49 +0300 Subject: [PATCH] policy: Fix not reseting attempts when disconnected If the link is disconnected before any profile connects it shall still reset the attempts as the device actually has been connected, otherwise the number of attempts may not be respected. --- plugins/policy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/policy.c b/plugins/policy.c index 0330456f8..c9a7c84b9 100644 --- a/plugins/policy.c +++ b/plugins/policy.c @@ -714,6 +714,8 @@ static void disconnect_cb(struct btd_device *dev, uint8_t reason) if (!reconnect || !reconnect->reconnect) return; + reconnect_reset(reconnect); + DBG("Device %s identified for auto-reconnection", device_get_path(dev)); -- 2.47.3