From 0004eb06d5d9a2f27521d9ce3b206d6f3f82c61e Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 17 Aug 2023 15:31:08 -0700 Subject: [PATCH] device: Restart temporary timer while connecting If the device is temporary restart its timer when attempt to connect to it since it can interrupt the connection attempt prematurely while it still scanning, etc. --- src/device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/device.c b/src/device.c index f6b0167bf..9b58e0c4e 100644 --- a/src/device.c +++ b/src/device.c @@ -5754,6 +5754,10 @@ int device_connect_le(struct btd_device *dev) /* Keep this, so we can cancel the connection */ dev->att_io = io; + /* Restart temporary timer to give it time to connect/pair, etc. */ + if (dev->temporary) + set_temporary_timer(dev, btd_opts.tmpto); + return 0; } -- 2.47.3