fix: prevent crash on Linux without NetworkManager from connectivity_plus DBus FD leak#1035
Open
Nyantad wants to merge 1 commit into
Open
fix: prevent crash on Linux without NetworkManager from connectivity_plus DBus FD leak#1035Nyantad wants to merge 1 commit into
Nyantad wants to merge 1 commit into
Conversation
…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.
77fcc05 to
43ee5b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
On Linux systems without NetworkManager,
connectivity_plusthrows unhandled DBus exceptions on everycheckConnectivity()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. EachcheckConnectivity()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 throwsUnimplementedErroron Linux.Resolves #issue-number
Screenshots / Recordings
N/A
Tested On
Checklist