Skip to content

AutoConnect: Log failed auto-connect attempts#3204

Open
gfrmin wants to merge 2 commits into
blueman-project:mainfrom
gfrmin:autoconnectlogging
Open

AutoConnect: Log failed auto-connect attempts#3204
gfrmin wants to merge 2 commits into
blueman-project:mainfrom
gfrmin:autoconnectlogging

Conversation

@gfrmin
Copy link
Copy Markdown

@gfrmin gfrmin commented Apr 14, 2026

The error callback in AutoConnect._run currently swallows failures silently with pass, so users get no feedback when the 60-second auto-connect loop can't reach a configured device.

Log the failure at warning level with the device name and reason so it surfaces in the journal/console.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@infirit
Copy link
Copy Markdown
Contributor

infirit commented Apr 18, 2026

@cschramm this looks fine to me but I don't remember if there was a reason this wasn't logged before. Maybe to spammy as it's every 60(ish) seconds?

Auto-connect retries every ~60s, so a permanently-unreachable device
would otherwise emit a warning line every minute forever. Track the last
error reason per device address; log only when the reason changes.
Clear the entry on a successful connect so a later failure logs again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants