Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Connection attempts, quieter notifications #171

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

gbakeman
Copy link
Contributor

  • Remove reconnection attempt limit; WinNUT now attempts to reconnect indefinitely.
  • Tweaked the Connection menu; it now has a convenient toggle for persistent connections (auto reconnect setting), renamed the Reconnect command to Connect, and the Connect/Disconnect commands are now enabled or disabled depending on the state of WinNUT.
    image
  • Small tweak to how the WinNUT window title is updated (should be more consistent.)
  • Overall notification spam when connecting, reconnecting and disconnecting is more manageable.

Closes #65, also may impact #145.

gbakeman added 3 commits July 25, 2024 14:33
- Add IsUPSConnected property to main WinNUT form for easier connection state checking
- Removed unused AutoReconnect boolean
- Added SettingsPropertyChanged method to activate when a setting is changed, allowing the UI to update any relevant states.
- Added UpdateMainMenuState which allows the main menu's state to be updated conveniently and consistently from anywhere in the WinNUT UI code (replaces the UpdateManageOldPrefsMenuItemStatus subroutine.)
- Reorganized the Connection menu, renaming the (Re)connect command, and adding a Persist toggle that controls the auto reconnection feature. Adding some graphics, and better control over the menu item's enabled state.
- Visual Studio designer deciding to move designer code around for no apparent reason
The main window title of WinNUT occasionally deviated from the defined program name (WinNUT Client) to just WinNUT. The string has been replaced.
UPS_Device.vb
- Provide a public readonly property indicating if the reconnect Timer is operating or not.
- Remove retry connection attempt event, retry counter and max retries integer.
- Connect_UPS subroutine only starts the reconnection timer on error if it isn't running already.
- General exception in Retrieve_UPS_Datas no longer calls the disconnect subroutine, in favor of the Socket_Broken sub (prevents double notifications to listening code.)

- Removed several strings related to reconnection attempts
- Do not announce connection errors while attempting to reconnect
@gbakeman gbakeman added bug Something isn't working enhancement New feature or request labels Jul 25, 2024
@gbakeman gbakeman added this to the 2.3 Stable Release milestone Jul 25, 2024
@gbakeman gbakeman linked an issue Jul 25, 2024 that may be closed by this pull request
@gbakeman gbakeman merged commit b722db2 into dev-2.3 Aug 3, 2024
1 check passed
@gbakeman gbakeman deleted the 65-persist-conn branch August 3, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smarter/Quieter/Indefinite Reconnection attempts
1 participant