From: "J. Nick Koston" <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] 9081c9: device: Fix device removal on le-connection-abort-...
Date: Thu, 21 Aug 2025 13:50:34 -0700 [thread overview]
Message-ID: <bluez/bluez/push/refs/heads/994230/000000-9081c9@github.com> (raw)
Branch: refs/heads/994230
Home: https://github.com/bluez/bluez
Commit: 9081c996fc62ab987282b7da23e0427388b02171
https://github.com/bluez/bluez/commit/9081c996fc62ab987282b7da23e0427388b02171
Author: J. Nick Koston <nick@home-assistant.io>
Date: 2025-08-21 (Thu, 21 Aug 2025)
Changed paths:
M src/device.c
Log Message:
-----------
device: Fix device removal on le-connection-abort-by-local
When a LE connection fails with le-connection-abort-by-local, temporary
devices are incorrectly removed from D-Bus, preventing clients from
retrying the connection.
The issue occurs when:
1. A connection attempt fails with ECONNABORTED (including the
le-connection-abort-by-local case)
2. The device is added to the connect list for automatic retry
3. The temporary timer (30s by default) is not restarted
4. If the timer expires before the retry completes, the device is
removed from D-Bus
5. Subsequent retry attempts fail with "device not found"
This commonly happens with devices that abort connections during
pairing or when incomplete GATT discovery triggers an abort.
The fix restarts the temporary timer when ECONNABORTED occurs, ensuring
the device remains available on D-Bus for the retry attempt. This
matches the behavior when new connection attempts are initiated, where
the timer is restarted to allow time for connection/pairing to complete.
Reproducer logs show:
- 14:19:37.374 - le-connection-abort-by-local, retry queued
- 14:19:56.343 - Device removed from D-Bus (~19s later)
- 14:19:56.606 - Retry fails: device not found on D-Bus
With this fix, the device remains available for the retry, allowing
the connection to succeed on subsequent attempts.
Fixes: https://github.com/bluez/bluez/issues/1489
Signed-off-by: J. Nick Koston <nick@koston.org>
Signed-off-by: J. Nick Koston <nick@home-assistant.io>
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
reply other threads:[~2025-08-21 20:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bluez/bluez/push/refs/heads/994230/000000-9081c9@github.com \
--to=noreply@github.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).