Skip to content

fix: prevent crash on Linux without NetworkManager from connectivity_plus DBus FD leak#1035

Open
Nyantad wants to merge 1 commit into
DonutWare:developfrom
Nyantad:fix/connectivity-dbus-fd-leak
Open

fix: prevent crash on Linux without NetworkManager from connectivity_plus DBus FD leak#1035
Nyantad wants to merge 1 commit into
DonutWare:developfrom
Nyantad:fix/connectivity-dbus-fd-leak

Conversation

@Nyantad

@Nyantad Nyantad commented Jun 21, 2026

Copy link
Copy Markdown

Pull Request Description

On Linux systems without NetworkManager, connectivity_plus throws unhandled DBus exceptions on every checkConnectivity() call (called after each API request), leaking file descriptors until the app crashes with "Too many open files". Wrapped connectivity checks in try-catch with a 5s debounce and cancel the stream subscription on dispose.

Issue Being Fixed

On Linux without NetworkManager, the app crashes after running for a while with epoll_create1() failed: Too many open files. Each checkConnectivity() call (triggered after every API request) opens a DBus connection that fails and leaks a file descriptor. After ~10,000 failures, the process exhausts its FD limit and crashes.

Also wrapped getNotificationAppLaunchDetails() in try-catch as it throws UnimplementedError on Linux.

Resolves #issue-number

Screenshots / Recordings

N/A

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • If a new package was added, did you ensure it works for all supported platforms? Is the package well maintained (No new packages added)
  • Check that any changes are related to the issue at hand.

…plus DBus FD leak

On Linux systems without NetworkManager, connectivity_plus throws unhandled DBus exceptions on every checkConnectivity() call (called after each API request), leaking file descriptors until the app crashes with "Too many open files". Wrapped connectivity checks in try-catch with a 5s debounce and cancel the stream subscription on dispose.
@Nyantad Nyantad force-pushed the fix/connectivity-dbus-fd-leak branch from 77fcc05 to 43ee5b0 Compare June 21, 2026 23:29
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.

1 participant